Loading ...
Sorry, an error occurred while loading the content.

Re: [flexcoders] Reduce time to load httpservice result

Expand Messages
  • Alex Harui
    What are the columns? On 3/30/12 12:32 PM, Isabelle Loyer Perso wrote: See below how xml look like:
    Message 1 of 9 , Apr 1, 2012
    • 0 Attachment
      Re: [flexcoders] Reduce time to load httpservice result What are the columns?


      On 3/30/12 12:32 PM, "Isabelle Loyer Perso" <isa_loyer@...> wrote:


       
       
         

         See below how xml look like:
       
       <MyDB>
       <p id="3557" np="DURAND Roland" pr="JF" d1=" / " dn="06/12/00" tel="06 26 14 14 34" st="1&#xE8;re consult. - 02/05/11"/><p id="861" np="DUPONF Paco" pr="JF" d1=" / " dn="01/07/88" tel="01 23 33 33 45" st="Archiv&#xE9; - 15/06/04"/>
       <p id="3549" np="ATAL Sophie" pr="JF" d1=" / " dn="27/02/78" tel="06 65 40 00 28 melle" st="1&#xE8;re consult. - 26/01/11"/>
       <p id="3453" np="ATAL Caroline" pr="JF" d1="385 / " dn="27/09/95" tel="01 49 81 23 43" st="Traitement - 26/05/11"/>
       </MyDB>
       
       Sort may be apply on click to datagrid header.
       
       Thanks
       
       Le 30/03/12 18:17, Alex Harui a écrit :
         
       

       A custom collection can help.  What does a record look like, and how many columns are displayed?  Is a sort applied right away or is it optional?
       
       
       On 3/29/12 11:14 PM, "Isabelle Loyer Perso" <isa_loyer@...> wrote:
       
       
       

        
        
          
       
          All record are on datagrid.
        All recordset must be sorting.
        
        I use sdk 4.6.
        
        Thanks for helping.
        
        Le 30/03/12 06:49, James Ong a écrit :
        
         
        
       
       So the whole 60k records or partial records must be visible on the page? You have not mention which flex sdk version you are using.
        
       On Mar 29, 2012 11:20 PM, "isa_loyer" <isa_loyer@...> wrote:
        
        

          
        
        
        
       
       Hi,
        
        I do a query to mysql database with httpservice.
        The result contains arround 60000 records.
        Time to create xml file is arround 40s, to slow for my customer.
        
        I try to accelerate the process with different methods, on server side, to generate file
        DOMDocument
        XmlWriter
        SimpleXMLElement
        
        As customer must be able to sort datagrid, I can not use pagging.
        
        So do you have an idea to load datagrid more speedly.
        
        Thanks
        
        
        
        
        
        
        
       
       
        
           
       
       
        
          
       
       
       

       --
       Alex Harui
       Flex SDK Team
       Adobe Systems, Inc.
       http://blogs.adobe.com/aharui
        
          

       
         



      --
      Alex Harui
      Flex SDK Team
      Adobe Systems, Inc.
      http://blogs.adobe.com/aharui
    • Isabelle Loyer Perso
      Colums are: id, pr, np, d1, dn, tel, st. So all colums on xml files are displayed. Thanks for helping Le 01/04/12 09:07, Alex Harui a crit : What are the
      Message 2 of 9 , Apr 1, 2012
      • 0 Attachment
        Colums are:
        id, pr, np, d1, dn, tel, st.

        So all colums on xml files are displayed.

        Thanks for helping

        Le 01/04/12 09:07, Alex Harui a écrit :
         

        What are the columns?


        On 3/30/12 12:32 PM, "Isabelle Loyer Perso" <isa_loyer@...> wrote:


         
         
           

           See below how xml look like:
         
         <MyDB>
         <p id="3557" np="DURAND Roland" pr="JF" d1=" / " dn="06/12/00" tel="06 26 14 14 34" st="1&#xE8;re consult. - 02/05/11"/><p id="861" np="DUPONF Paco" pr="JF" d1=" / " dn="01/07/88" tel="01 23 33 33 45" st="Archiv&#xE9; - 15/06/04"/>
         <p id="3549" np="ATAL Sophie" pr="JF" d1=" / " dn="27/02/78" tel="06 65 40 00 28 melle" st="1&#xE8;re consult. - 26/01/11"/>
         <p id="3453" np="ATAL Caroline" pr="JF" d1="385 / " dn="27/09/95" tel="01 49 81 23 43" st="Traitement - 26/05/11"/>
         </MyDB>
         
         Sort may be apply on click to datagrid header.
         
         Thanks
         
         Le 30/03/12 18:17, Alex Harui a écrit :
           
         

         A custom collection can help.  What does a record look like, and how many columns are displayed?  Is a sort applied right away or is it optional?
         
         
         On 3/29/12 11:14 PM, "Isabelle Loyer Perso" <isa_loyer@...> wrote:
         
         
         

          
          
            
         
            All record are on datagrid.
          All recordset must be sorting.
          
          I use sdk 4.6.
          
          Thanks for helping.
          
          Le 30/03/12 06:49, James Ong a écrit :
          
           
          
         
         So the whole 60k records or partial records must be visible on the page? You have not mention which flex sdk version you are using.
          
         On Mar 29, 2012 11:20 PM, "isa_loyer" <isa_loyer@...> wrote:
          
          

            
          
          
          
         
         Hi,
          
          I do a query to mysql database with httpservice.
          The result contains arround 60000 records.
          Time to create xml file is arround 40s, to slow for my customer.
          
          I try to accelerate the process with different methods, on server side, to generate file
          DOMDocument
          XmlWriter
          SimpleXMLElement
          
          As customer must be able to sort datagrid, I can not use pagging.
          
          So do you have an idea to load datagrid more speedly.
          
          Thanks
          
          
          
          
          
          
          
         
         
          
             
         
         
          
            
         
         
         

         --
         Alex Harui
         Flex SDK Team
         Adobe Systems, Inc.
         http://blogs.adobe.com/aharui
          
            

         
           



        --
        Alex Harui
        Flex SDK Team
        Adobe Systems, Inc.
        http://blogs.adobe.com/aharui
      • Alex Harui
        So you are using all attributes in a node? Are you sure the bottleneck is on the server side? Are you handling the data on the client as XML or as value
        Message 3 of 9 , Apr 1, 2012
        • 0 Attachment
          Re: [flexcoders] Reduce time to load httpservice result So you are using all attributes in a node?

          Are you sure the bottleneck is on the server side?   Are you handling the data on the client as XML or as value objects?  Often, the conversion to value objects takes the most time.  I have created custom collections in the past that lazily convert XML to a value object so only the visible rows get converted instead of all 60K rows, and other custom collections that lazily convert attributes when there are 100’s of attributes or child nodes and only a few are used as columns.  That doesn’t appear to be the case.

          You can still use a custom collection and paging.  You could write a custom collection that uses a timer to fetch more and more rows from the server.  It would grab as large a chunk as it can that has acceptable performance, then when it arrives it requests the next chunk until all records are down.  Yes, if the user quickly tries a sort he will have to wait, but probably not a whole lot longer than waiting for the initial 60K rows anyway.

          Also, I believe there are some examples out there of using paging and server-side sorting in a DataGrid.  The thing to consider is the total amount of data being transferred and what percentage of it a user typically uses.  If it is small, server-side sorting might be better.


          On 4/1/12 12:59 PM, "Isabelle Loyer Perso" <isa_loyer@...> wrote:


           
           
             

             Colums are:
           id, pr, np, d1, dn, tel, st.
           
           So all colums on xml files are displayed.
           
           Thanks for helping
           
           Le 01/04/12 09:07, Alex Harui a écrit :
             
           

           What are the columns?
           
           
           On 3/30/12 12:32 PM, "Isabelle Loyer Perso" <isa_loyer@...> wrote:
           
           
           

            
            
              
           
              See below how xml look like:
            
            <MyDB>
            <p id="3557" np="DURAND Roland" pr="JF" d1=" / " dn="06/12/00" tel="06 26 14 14 34" st="1&#xE8;re consult. - 02/05/11"/><p id="861" np="DUPONF Paco" pr="JF" d1=" / " dn="01/07/88" tel="01 23 33 33 45" st="Archiv&#xE9; - 15/06/04"/>
            <p id="3549" np="ATAL Sophie" pr="JF" d1=" / " dn="27/02/78" tel="06 65 40 00 28 melle" st="1&#xE8;re consult. - 26/01/11"/>
            <p id="3453" np="ATAL Caroline" pr="JF" d1="385 / " dn="27/09/95" tel="01 49 81 23 43" st="Traitement - 26/05/11"/>
            </MyDB>
            
            Sort may be apply on click to datagrid header.
            
            Thanks
            
            Le 30/03/12 18:17, Alex Harui a écrit :
            
             
            
           
            A custom collection can help.  What does a record look like, and how many columns are displayed?  Is a sort applied right away or is it optional?
            
            
            On 3/29/12 11:14 PM, "Isabelle Loyer Perso" <isa_loyer@...> wrote:
            
            
            
            

             
             
               
            
               All record are on datagrid.
             All recordset must be sorting.
             
             I use sdk 4.6.
             
             Thanks for helping.
             
             Le 30/03/12 06:49, James Ong a écrit :
             
            
             
             
            
            So the whole 60k records or partial records must be visible on the page? You have not mention which flex sdk version you are using.
             
            On Mar 29, 2012 11:20 PM, "isa_loyer" <isa_loyer@...> wrote:
             
             
            

               
             
             
             
            
            Hi,
             
             I do a query to mysql database with httpservice.
             The result contains arround 60000 records.
             Time to create xml file is arround 40s, to slow for my customer.
             
             I try to accelerate the process with different methods, on server side, to generate file
             DOMDocument
             XmlWriter
             SimpleXMLElement
             
             As customer must be able to sort datagrid, I can not use pagging.
             
             So do you have an idea to load datagrid more speedly.
             
             Thanks
             
             
             
             
             
             
             
            
           
            
             
                
            
           
            
             
               
            
            
            
           
           
            --
            Alex Harui
            Flex SDK Team
            Adobe Systems, Inc.
            http://blogs.adobe.com/aharui
             
               
           
           
            
              
           
           
           

           --
           Alex Harui
           Flex SDK Team
           Adobe Systems, Inc.
           http://blogs.adobe.com/aharui
            
              

           
             



          --
          Alex Harui
          Flex SDK Team
          Adobe Systems, Inc.
          http://blogs.adobe.com/aharui
        Your message has been successfully submitted and would be delivered to recipients shortly.