View Full Version : TreeStore node appendchild is very very slow...

8 May 2014, 7:56 AM
We have treegrid with 200 rows & 20 columns. Our API response is not automatically fit to the grid data model needs, so we need to touch up the little bit and add children to rootnode.
when user tries to expand the node which has indication of children present, we are making another call to server and append children to selected node. We do not load the children if they are already loaded.

Both of the above operations are taking around 7 to 8 seconds to update grid, we have very urgent need to improve this and there is no time for updating API and using proxy to this. Why does appendChild takes quite long time?

I am trying one other option in my approach rootNode.appendChild(arrayofDataObjects, true), which is quite fast in updating the rootNode because I am stopping all events that are being raised in this function call, looks like there is no update event from store and grid is not refreshing the data. But I do see that childNodes are present in rootNode. Is there a way I can refresh the grid with data available in rootNode?

Thanks in advance.

8 May 2014, 9:45 AM
Try to suspendEvents(), append children, resumeEvents() on rootNode and if that doesn't help then on the tree store.