View Full Version : [CLOSED] 4.0.6-4.0.7 TreeStore change

26 Oct 2011, 4:40 AM

Just noticed something very odd going on with the TreeStore in 4.0.7, and after some investigation have figured out what is going on (I think), but would like to know why the change was made.

First, the effect I'm seeing... I have a tree with the ability to reload at a given node.
This should result in a single call to the server, using Ext.Direct, to load the nodes children.
What I'm seeing now is a call per existing child node, passing just the node up, and finally the call that _should_ be made, with the correct parameters to load the data.

Have tracked it down to the change in TreeStore.load, where node.removeAll() was changed to be node.removeAll(true), i.e. the nodes should now be destroyed.

Stepping through, and into my favourite "class" in the framework(!), NodeInterface, I see that because destroy is called with silent set to "true", a call to the proxy is made, presumably to tell the server that the node has been destroyed or something (so it can be deleted perhaps?!).

I'm sorry but what?!
We're reloading a node here, not deleting one.

If I change removeAll back to not destroy, or the destruction to not be silent, then I get the single call to the server. Obviously loads of chatter to the server for no reason is expensive, and kills performance.

Obviously I can work around this, by reverting the change in an override, but would argue that the change makes no sense, hence my post...

Would welcome any insight.
Perhaps code changes should have comments on them listing the bug number being addressed, since that would probably help determine the intention.


26 Oct 2011, 11:46 AM
I suggest to move this thread to Bugs (I can do it for you if you want) because this question is aimed directly to developers. Bugs forum is scanned by them, this forum not.

28 Oct 2011, 1:51 AM
If you could please; seems that I can only close or delete the thread.

Of course, if it's moved to the bugs forum I'll just get told off for not supplying a test case, but hey ho ;)
Think it needs thinking about.

Some additional info that may be relevant, I'm using directFn rather that the CRUD config for my proxy.


28 Oct 2011, 6:36 AM
Yeap, this is definitely related to zombeerose's thread http://www.sencha.com/forum/showthread.php?151211-Reloading-TreeStore-adds-all-records-to-store-getRemovedRecords&p=664477

29 Oct 2011, 3:57 PM
Agreed, looks like a dupe. Please track in the other thread.