pjekel/cbtree

Observable vs Eventable store

Closed this issue · 3 comments

Not really an issue any more, but I couldn't find any other way of contactng you, so here goes:

I noticed that when adding objects to an observable store that is used by a cbtree, the time it takes for objects to appear in the tree takes longer each time an object is added (about 15 seconds! when adding the 12th object).

The way I understand it, it shouldn't have anything to do with the store being observable, since I have a flat list in my tree, with no checkboxes and only one query that is being observed (the entire store, to see if objects are added/changed/removed). However, when I use an eventable store it works perfectly fine no matter how many objects are added to the store.
What am I missing here? Has it something to do with me using a ForestStoreModel and so there are actually several branches and therefore several queries?

On a side note: what is the best way to tell the model that it should not show the [+]/[-] in front of the elements if they have no children? Should I overwrite the "mayHaveChildren"-method?

Sudion,

Without having seen any of your code it is difficult to analyze the problem. I just rewrote sample /demos/store/tree01.html to 'manually' add objects to the store and it take 10ms to add the objects and render the tree.

Please post a message at http://www.thejekels.com/blog/featured/the-new-dijit-checkbox-tree/ and specify an email address so I can reach you.

Sudlon,

After review and testing it was determined that the BaseModelStore did not correctly remove obsolete Observers. The issue has been corrected and an updated version of the cbtree package has been released. Please download cbtree-v0.9.3-1.zip @ http://thejekels.com/download/cbtree/

Thanks for pointing out the defect.

You are welcome! And thank you very much for addressing the issue so quickly!