3 Jun 2010 7:17 AM #1
TreeLoader/ TreeStore slowness
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.-->
3 Jun 2010 7:20 AM #2-->
3 Jun 2010 7:22 AM #3
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-->
3 Jun 2010 7:46 AM #4
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?-->
3 Jun 2010 7:48 AM #5
The changes will also improve TreeGrid. GXT 2.2 is planned to be released this month.
The changes will be in SVN very soon-->
3 Jun 2010 7:55 AM #6
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.-->
3 Jun 2010 7:56 AM #7but you should put it back for the benefit of users in my position.-->
3 Jun 2010 8:25 AM #8
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.-->
3 Jun 2010 8:29 AM #9. 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.
Check your pms.-->
3 Jun 2010 8:36 AM #102. 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.
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-->
By Stju in forum Community DiscussionReplies: 2Last Post: 17 Mar 2010, 4:24 PM
By GrassyHill in forum Community DiscussionReplies: 8Last Post: 24 Sep 2009, 8:59 AM
By RyanZec in forum Ext 2.x: Help & DiscussionReplies: 8Last Post: 17 Apr 2008, 5:07 PM
By jarrod in forum Ext 1.x: Help & DiscussionReplies: 1Last Post: 11 Dec 2006, 6:08 AM