Opened 10 years ago
Closed 4 years ago
#9869 closed enhancement (patchwelcome)
Tree: option to temporarily disable UI updates
Reported by: | Icannon | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.13 |
Component: | Dijit | Version: | 1.3.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
Add an option to the Tree to temporarily disabled UI updates for efficiency when making many (individual) updates to the data store.
Original description: I have a change to submit for ItemFileWriteStore?.js
This improves newItems refreshes in the dojo dijit tree. Instead of having the tree update and refresh the display for each newItem call it can do this once every 50 or even 100 calls.
Attachments (1)
Change History (8)
Changed 10 years ago by
Attachment: | ItemWriteStore.js added |
---|
comment:1 Changed 10 years ago by
If you are adding several thousand items to the dojo dijit tree store then the tree has to refresh for each node which slows down the tree and requires a user to prompt if they want to continue the script. This is much worse in internet explorer.
This is an example of a dijit tree call for the optimized item write store.
This is a kind of optimization... we only refresh the tree when it's the last node added. This way, we don't spend a lot of time refreshing the nodes from 1 to N when all that is needed is that last node to be refreshed to update the tree. This adds an extra parameter to the dataStore object called "noRefresh" which does not do a refresh if the value is true. if (i == (numberChildren-1)) {
childItem = dataStore.newItem(newItemProps, parentItemProps, 0);
} else {
childItem = dataStore.newItem(newItemProps, parentItemProps, 1);
}
comment:2 Changed 10 years ago by
Component: | General → Data |
---|---|
Owner: | changed from anonymous to Jared Jurkiewicz |
Hmm, I'm doubtful that we want to change the store to add an extra parameter. Let's see what Jared thinks. I do see the problem you are talking about though. It seems like maybe you'd want a parameter to tree, although it's probably best to just somehow turn off the tree and then refresh the whole tree after the data store has changed.
Also, who are you? You are registered as Uil Uil. We need a http://dojotoolkit.org/cla CLA filed before we can accept patches, and then they should be in http://en.wikipedia.org/wiki/Diff#Unified_format patch file format, thanks!
comment:3 Changed 10 years ago by
I don't like this as it's not part of the datastore spec. The spec states when a new item is added, an event is fired. I think it would be better to have the tree be able to disable UI uopdated for a period, then re-enable them. Grid has such a parameter, where it will disable any refreshing until so desired to re-enable it. Specifically for cases where lots of changes occur to the underlying data in one shot.
comment:4 Changed 10 years ago by
Component: | Data → Dijit |
---|---|
Description: | modified (diff) |
Milestone: | tbd → future |
Owner: | Jared Jurkiewicz deleted |
Summary: | itemwritestore improvement to control refresh notification → Tree: option to temporarily disable UI updates |
Type: | defect → enhancement |
OK, I'm changing this to a ticket to be able to temporarily disable UI updates in the Tree.
Not sure I'm crazy about that idea, but I'll leave it in this ticket to consider.
comment:5 Changed 7 years ago by
Priority: | high → low |
---|
comment:6 Changed 4 years ago by
Milestone: | future → 1.12 |
---|
Given that no one has shown interest in creating a patch in the past 5+ years, I'm closing this as patchwelcome.
comment:7 Changed 4 years ago by
Resolution: | → patchwelcome |
---|---|
Status: | new → closed |
Changed the itemWriteStore.js to control newItem notification.