1. #1
    Sencha User
    Join Date
    Mar 2010
    Posts
    54
    Vote Rating
    0
    petko.ivanov is on a distinguished road

      0  

    Thumbs up TreeLoader/ TreeStore slowness

    TreeLoader/ TreeStore slowness


    hi,
    there are quite a lot of posts about slowness when working with trees.
    The usual symptom is a pop-up message in IE that complains the script is taking too long. Firefox seems fine but is actually still taking a long time.
    -->

  2. #2
    Sencha User
    Join Date
    Mar 2010
    Posts
    54
    Vote Rating
    0
    petko.ivanov is on a distinguished road

      0  

    Default


    i just saw :
    http://www.extjs.com/examples-dev/ex....html#fasttree
    so will try this next and report results.
    btw for comparison - my tree size is about 450 leaf nodes.
    -->

  3. #3
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    You could have used the forum serach. GXT 2.2 will contain many improvements for this as discussed about 100 times in the last month. Your suggested fix brakes much functionality. I will remove that code from the post
    -->

  4. #4
    Sencha User
    Join Date
    Mar 2010
    Posts
    54
    Vote Rating
    0
    petko.ivanov is on a distinguished road

      0  

    Default


    i did search - could not find anything relevant. Also the fasttree is not really relevant to me as i am interested in the TreeGrid component. The above is the only way i could get TreeGrid to be actually usable in IE.
    When will GXT 2.2 be available, where can i see a demo please?
    just out of curiosity - what functionality does this break?
    -->

  5. #5
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    The changes will also improve TreeGrid. GXT 2.2 is planned to be released this month.

    The changes will be in SVN very soon
    -->

  6. #6
    Sencha User
    Join Date
    Mar 2010
    Posts
    54
    Vote Rating
    0
    petko.ivanov is on a distinguished road

      0  

    Default


    ok, i can retest my use case as soon as 2.2 is out.
    However, my code needs to be deployed asap (as usual) so the patch i posted is the only solution i have at the moment. If u can propose anything better , i would be happy to try it.
    I definitely understand if u think the code is no longer relevant so no need to incorporate it but you should put it back for the benefit of users in my position.
    -->

  7. #7
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    but you should put it back for the benefit of users in my position.
    Your code can brake functionality. That is why i removed it. It should not be advertised as fix for slowness.
    -->

  8. #8
    Sencha User
    Join Date
    Mar 2010
    Posts
    54
    Vote Rating
    0
    petko.ivanov is on a distinguished road

      0  

    Default


    the rationale for my fix is as follows:
    1. when nodes are inserted, their children are added with suppressEvents flag = false (hardcoded). at a minimum it should be the value of the suppressEvents flag of the caller. If i dont want events for the parent, why would i want events for the children? does not make sense.
    2. actually if you think about it again, even if u do want events generated for the top level nodes i am inserting, i dont see why i would need events generated for their children (and grandchildren) as they are not visible yet. Once they become visible, the proper events are generated anyway so all works as expected.
    I can see why/how the current version works but it errors on the side of safety by generating too many events and as a direct result of this slows insertions of even a few hundred elements to the point that its not really usable. If people cant use IE , then i am sorry but it simply does not work. IE currently pop this warning, stop the script execution and the treestore is incomplete. My code only generates events for elements that are visible. If you have a test case where these events are actually required i can admit that my code will not work for them but frankly i dont have such a case. I suspect most users dont, so they should be fine to use this code too.
    Removing the code is a bit too aggressive on your side. At worse it only fixes a specific use case, at best it fixes a general bug. Users still have the choice to use whichever TreeStore they want.
    -->

  9. #9
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    . At worse it only fixes a specific use case, at best it fixes a general bug. Users still have the choice to use whichever TreeStore they want.
    And exactly this is the problem. They simple use it without thinking about it and even forget, that they use it. We run into too many problems with this already.
    Check your pms.
    -->

  10. #10
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    2. actually if you think about it again, even if u do want events generated for the top level nodes i am inserting, i dont see why i would need events generated for their children (and grandchildren) as they are not visible yet. Once they become visible, the proper events are generated anyway so all works as expected.
    TreeStore is not linked to any component. Also if component X may not display the items yet. You want the info somewhere else.

    Else let me ask you this question. If you are not displaying the items yet, why do you add them? It is just data that sits in the memory and is uneeded at this point
    -->

Similar Threads

  1. TreeStore
    By Stju in forum Community Discussion
    Replies: 2
    Last Post: 17 Mar 2010, 4:24 PM
  2. Slowness in callback
    By GrassyHill in forum Community Discussion
    Replies: 8
    Last Post: 24 Sep 2009, 8:59 AM
  3. Slowness when using ExtJS
    By RyanZec in forum Ext 2.x: Help & Discussion
    Replies: 8
    Last Post: 17 Apr 2008, 5:07 PM
  4. Grid autoSize() slowness?
    By jarrod in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 11 Dec 2006, 6:08 AM

Thread Participants: 1

Tags for this Thread