1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    6
    Vote Rating
    1
    sf_cs is on a distinguished road

      0  

    Default Store performance

    Store performance


    Hi,

    we have a list which is connected to a store. We filled the store with data from a phonegap database like that:

    PHP Code:
    var store Ext.getStore('Storename');

    for (var 
    i=0i<data.lengthi++){
      var 
    modelObject = new Object();
      
    modelObject.var1data.asdf;
      
    modelObject.var2data.qwer;
      
    store.add(modelObject);

    With the above code we experienced very bad performance. We found out that each add rebuild the list. We got a much better performance with the following code

    PHP Code:
    var store Ext.getStore('Storename'),
          
    modelArray = new Array(),

    for (var 
    i=0i<data.lengthi++){
      var 
    modelObject = new Object();
      
    modelObject.var1data.asdf;
      
    modelObject.var2data.qwer;
      
    modelArray.push(modelObject);
    }
    store.add(modelArray); 
    Regards

  2. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    2,914
    Vote Rating
    89
    fmoseley is just really nice fmoseley is just really nice fmoseley is just really nice fmoseley is just really nice fmoseley is just really nice

      0  

    Default


    Thank you for sharing.

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar