Opened 8 years ago

Closed 8 years ago

#14131 closed defect (invalid)

Lazy Loading Tree Results In Unnecessary Network Activity

Reported by: acabler Owned by:
Priority: high Milestone: tbd
Component: Dijit Version: 1.6.1
Keywords: tree lazy-loading network Cc:
Blocked By: Blocking:

Description (last modified by bill)

Using the tree dijit with a ForestStoreModel and a JsonRestStore, there is a lot of unnecessary network activity. On every expansion, the root is queried once again for every node. From reading the docs, this is not supposed to happen since the goal of lazy loading is efficiency.

Attachments (1)

Tree_with_JRS.html (2.9 KB) - added by bill 8 years ago.
test file to reproduce problem, modified from original Tree_with_JRS.html to not automatically open the tree nodes

Download all attachments as: .zip

Change History (2)

comment:1 Changed 8 years ago by bill

Component: GeneralDijit
Description: modified (diff)
Resolution: invalid
Status: newclosed

Not sure which docs you were reading but the ForestStoreModel API doc, in the "event summary" section, explains that:

onSetItem(item, attribute, oldValue, newValue) Updates the tree view according to changes to an item in the data store. Developers should override this method to be more efficient based on their app/data.

Actually, many of the methods in ForestStoreModel need to be overridden, as documented in that documentation section.

Sorry that this is kind of confusing, but anyway it will become easier with #13781.

PS: I should also mention that this is occurring because during expansion of item in JsonRestStore, onSetItem() is getting called, even though the items aren't really changing. This is an inefficiency in JsonRestStore.

Last edited 8 years ago by bill (previous) (diff)

Changed 8 years ago by bill

Attachment: Tree_with_JRS.html added

test file to reproduce problem, modified from original Tree_with_JRS.html to not automatically open the tree nodes

Note: See TracTickets for help on using tickets.