Results 1 to 8 of 8

Thread: Ext.List - Slow performance

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    26

    Default Ext.List - Slow performance

    I'm loading an Ext.List with 195 items via JSON.

    On my computer, my browser locks up for maybe about 3 seconds, then works fine.

    On the Android, however, the browser locks up for 10+ seconds and then works normally.

    Is this normal with large lists in Sencha Touch? Anything I can do to improve performance?

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Location
    Haarlem, Netherlands
    Posts
    1,243

    Default

    Would it be possible for you to post a testcase that replicates your exact list configuration? With performance many factors can play a role. I would like to see your model, store and list configurations especially. Having that I could check to see if there is something we can improve.

  3. #3
    Sencha User ilija139's Avatar
    Join Date
    Aug 2011
    Location
    Macedonia
    Posts
    36

    Default

    Why don't you lazy load your list? You can use the list paging (http://docs.sencha.com/touch/2-0/#!/...gin.ListPaging) plugin to load for example 20 items at a time.
    I don't think there is anything else that can be done considering the size of the list and the limitations of the CPU on some devices, since whatever you do you must parse all that ~200 items.

  4. #4
    Sencha User
    Join Date
    Feb 2012
    Posts
    26

    Default

    Thanks for the replies, I'll look into using the lazy list a little later. It just strikes me that performance is slow, 195 doesn't seem to be a huge list, but maybe it is by Sencha Touch standards.

    Does anything look wrong in the code below? (besides the sloppy formatting)

    Code:
    Ext.define('Household', {
        extend : 'Ext.data.Model',
        config : {
            fields : [
                            { name : 'id', type : 'int' },
                { name : 'HHName', type : 'string' },
                            { name : 'RegAddr', type : 'string' },
                            { name : 'RegCity,', type : 'string' },
                { name : 'RegState', type : 'string' },
                            { name : 'REGZIP1 ', type : 'int' }
            ]
        }
    });
    
    var store = Ext.create('Ext.data.Store', {
        model    : 'Household',
        autoLoad : true,
        proxy    : {
            type   : 'ajax',
            url    : 'get_households.php',
            reader : {
                type         : 'json',
                rootProperty : 'households'
            }
        }
    });
    
      var list = Ext.create('Ext.List', {
                    title: 'List',
                    iconCls: 'team',
            store: store,
            itemTpl: '<b>{HHName}</b><br />&nbsp;&nbsp;&nbsp;{RegAddr}'
                    }
        });
    JSON Sample:

    Code:
    {"households":[{"id":"126","HHName":"John Smith Household","RegAddr":"1610 Elm St.","RegCity":"Chicago","RegState":"IL","REGZIP1":"60640"}]}

  5. #5
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661

    Default

    Are you using RC1 or RC2?

    Sencha Inc

    Jamie Avins

    @jamieavins

  6. #6
    Sencha User
    Join Date
    Feb 2012
    Posts
    26

    Default

    I'm using RC2

  7. #7

  8. #8
    Sencha User
    Join Date
    Feb 2012
    Posts
    26

    Default

    FYI the code in this thread resolved my issue:

    http://www.sencha.com/forum/showthre...RC-than-Beta-3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •