1. #1
    Sencha User biohazardo's Avatar
    Join Date
    Jan 2012
    Posts
    46
    Vote Rating
    -1
    biohazardo is an unknown quantity at this point

      0  

    Default Unanswered: Optimization of loadData method.

    Unanswered: Optimization of loadData method.


    I have some data in array (23000 records). I need to load it into store. I test performance in virtual machine.

    Chrome do loading for 4 seconds, IE8 for 200! seconds. I've suspended events on this store. What can I do to optimize this part of application. (IE drops annoying errors about long running script)..

    PHP Code:

    Wtb
    .getPlanShiftStore().suspendEvents(false);   
                                     
    Wtb.getPlanShiftStore().loadData(data);    
                                    
    Wtb.getPlanShiftStore().resumeEvents(); 
    Maybe there is some another method, that will do it faster, or I need to override something? I just need to create models and put it into store's data... Or it's impossible...?

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,085
    Answers
    675
    Vote Rating
    467
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    This this store tied to a grid? or are you just populating the store ..

    Scott.

  3. #3
    Sencha User biohazardo's Avatar
    Join Date
    Jan 2012
    Posts
    46
    Vote Rating
    -1
    biohazardo is an unknown quantity at this point

      0  

    Default


    I have an MVC application. Viewport is created after all data generation and loading. When the store is loading, grid isn't exist yet.

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,085
    Answers
    675
    Vote Rating
    467
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    In researching this .. the simple truth is that <=1E8 is very slow in these matters. As you can see but the difference, the browser is the difference. Have you tried IE9 to see if the speed is any better?

    Scott.

  5. #5
    Sencha User biohazardo's Avatar
    Join Date
    Jan 2012
    Posts
    46
    Vote Rating
    -1
    biohazardo is an unknown quantity at this point

      0  

    Default


    Quote Originally Posted by scottmartin View Post
    Have you tried IE9 to see if the speed is any better?
    Scott.
    I tried. I don't have problems with IE9, it's fast.

    IE8 throws annoying errors abount "long running script". I solved this way:
    I have sleep method on server (100 ms). And I load my story by parts (3000 records), and then I do sleep. IE stops to throw errors in that case.

  6. #6
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Chisinau, Moldova
    Posts
    642
    Answers
    21
    Vote Rating
    25
    vadimv will become famous soon enough vadimv will become famous soon enough

      0  

    Default


    Quote Originally Posted by biohazardo View Post
    I have some data in array (23000 records). I need to load it into store.
    Why you need them all 23000 ? obviously that will be some performance issues, why you just don't use pagination and load saying 400 records, less or more, or why not to use a buffered grid !!!?

  7. #7
    Sencha User biohazardo's Avatar
    Join Date
    Jan 2012
    Posts
    46
    Vote Rating
    -1
    biohazardo is an unknown quantity at this point

      0  

    Default


    Quote Originally Posted by vadimv View Post
    Why you need them all 23000 ? obviously that will be some performance issues, why you just don't use pagination and load saying 400 records, less or more, or why not to use a buffered grid !!!?
    I need them all for counting. I defined new type of grid, that will create pages ( analog of paging grid, buffered grid works bad with 80 columns and renderers). But my store NEED ALL of records. I need to keep all of them on client, I can't load parts from server. That records are generated on client, and they need to be here.

    And it's not just simple grid, it's scheduler, and there are 23000 events.

  8. #8
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Chisinau, Moldova
    Posts
    642
    Answers
    21
    Vote Rating
    25
    vadimv will become famous soon enough vadimv will become famous soon enough

      0  

    Default


    hmm....don't know, still didn't get why you need all records on client, your explanation is a little confusing to me.... I have buffered grid on an app whit thousands of records, and no problems regarding rendering or loading time.....BUT 80 columns !!!!! and so many events, you sth thinking wrong there or could be that your general approach to the requirement is wrong.
    For what counting ? you need their total number or what ?

    And btw or buffered grid or paging toolbar is almost the same, just user actions are different : with the former you page through records with the scroller, second with clicking on buttons, but both are working with pages at store level.

  9. #9
    Sencha User biohazardo's Avatar
    Join Date
    Jan 2012
    Posts
    46
    Vote Rating
    -1
    biohazardo is an unknown quantity at this point

      0  

    Default


    Quote Originally Posted by vadimv View Post
    And btw or buffered grid or paging toolbar is almost the same, just user actions are different : with the former you page through records with the scroller, second with clicking on buttons, but both are working with pages at store level.
    When user click button, he can wait loading of view. When he scroll, he don't want to see laggy scrolling, jumping summary e.t.c

  10. #10
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,085
    Answers
    675
    Vote Rating
    467
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    I think the issue here is IE8, correct? It works fine in all other version browsers ..
    To answer your question ... there is no magic setting to fix IE8.

    Scott.