Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    10
    Answers
    2
    Vote Rating
    0
    Manoj.Aggarwal is on a distinguished road

      0  

    Default Answered: Tree taking long time in loading when records exceeds 200 count

    Answered: Tree taking long time in loading when records exceeds 200 count


    Hi

    We are using Ext Tree in our project . We observered that whenever the record counts increases 200 count, tree takes long time in rendering . Data from the server comes in around max 1 sec but rendering of the tree takes more than 20-25 secs.

    I am posting below the code we have been using in our project . I would request you to review my code and help us in knowing what wrong is happening.[
    code]
    Ext.define('treeNode', {
    extend: 'Ext.data.Model',
    fields: [
    { name: 'id', type: 'string' },
    { name: 'text', type: 'string' },
    { name: 'code', type: 'string' },
    { name: 'nodeType', type: 'string' },
    { name: 'qtip', type: 'string' }
    ]
    });

    var store = Ext.create('Ext.data.TreeStore', {
    model: 'treeNode',
    sortOnLoad: false,
    batchUpdateMode:'complete',
    proxy: {
    type: 'ajax',
    url: 'Services/InfographicsDataService.svc/GetTree',
    extraParams: {
    langCode: lcode,
    surveyCode: scode
    },
    headers: {
    'Content-Type': 'application/json; charset=utf-8'
    },
    reader: {
    type: 'json',
    root: 'd'
    }
    },
    listeners:
    {
    append: function () {

    },
    load: function () {

    },
    write: function () {

    }
    },
    root: {
    text: 'CodeBook(' + scode.toUpperCase() + ')',
    id: 'root',
    expanded: true
    }

    });

    this.tree = Ext.create('Ext.tree.Panel', {
    store: store,
    columnLines: true,
    header: false,
    renderTo: 'tree-div',
    height: 220,
    width: 713,
    useArrows: false,
    iconCls: 'x-tree-noicon',
    style: { 'fontize': '20px' },
    // viewConfig: {
    // style: { overflowX: 'true' }
    // },

    });

    [/code]



    Regards,

  2. Hi ,

    Thanks for reply.

    I have found the problem. Problem is in the line
    root: {
    expanded: true
    }

    with root expanded setting, tree loads the next level data also BUT- It loades next level data in non batchupdate mode and thus takes a lot of time specially in getHeight method(extjs calls internally) which tree calls for each node.
    If I keep root node expanded false and expand programatically my root node and in after render event ( afterrender:function (tree) {tree.getRootNode().expand();) then tree loads next level data in batchupdate mode and loads the tree in less than 1 sec.

    If I am unclear let me know. I would try to explain more. rest extjs people can make us understand.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,519
    Answers
    3447
    Vote Rating
    814
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The issue may not be your code but the tree trying to render everything and browser having to take time to do it for that many nodes
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    52
    Vote Rating
    11
    celticboyone will become famous soon enough

      0  

    Default


    Might be something else - does the render time change with the timout set in the proxy, if you set it to 10000 for example is the render time redubced to about 10 seconds? If you set "Autoload" for the store does it render fast then?

  5. #4
    Sencha User
    Join Date
    Jul 2012
    Posts
    10
    Answers
    2
    Vote Rating
    0
    Manoj.Aggarwal is on a distinguished road

      0  

    Default


    Hi ,

    Thanks for reply.

    I have found the problem. Problem is in the line
    root: {
    expanded: true
    }

    with root expanded setting, tree loads the next level data also BUT- It loades next level data in non batchupdate mode and thus takes a lot of time specially in getHeight method(extjs calls internally) which tree calls for each node.
    If I keep root node expanded false and expand programatically my root node and in after render event ( afterrender:function (tree) {tree.getRootNode().expand();) then tree loads next level data in batchupdate mode and loads the tree in less than 1 sec.

    If I am unclear let me know. I would try to explain more. rest extjs people can make us understand.

  6. #5
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    52
    Vote Rating
    11
    celticboyone will become famous soon enough

      0  

    Default


    Well done, and thank you for letting us know. Nested lists are powerful but they have a log of quirks - I spend more time on them than almost anything!

Thread Participants: 2

Tags for this Thread