You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example data can be found in data6.json.zip - make sure to update the URL on line 4: dd.Url("data6.json");
When working with huge amounts of selected items in a DropDown control, switching to the TreeView picker is painfully slow, which the example demonstrates.
Open the DropDown control and choose "Show available options". 16.000+ TreeView nodes will be loaded and selected. Now close the DropDown control, open it again, and click "Show available options" again - notice how long it takes for the TreeView to emerge.
This is due to the fact that selections in the DropDown control is synchronized to the picker control when it is made the active picker, in case the picker was not initially assigned to the DropDown control prior to assigning a value to the DropDown control:
// Allow picker to select items in case selections have already been set in drop down
Most often we only need to do this the very first time a picker control is assigned to the DropDown control - and remember that any number of pickers might be used with the DropDown control, so we would need a flag for each individual picker control assigned!
Do make sure that changing selected state on picker controls directly does not cause new problems, if synchronization is only done once going forward. What happens if we call Clear() directly on the picker? Ideally it synchronizes the change back to the DropDown (expected), but it can not be allowed to cause inconsistency between the DropDown's selection and the picker's selection.
Also try invoking dropdown.GetTreeView().Reload(false) and dropdown.GetTreeView().Reload(true) on an instance of WSDropDown. The first will not restore selected nodes, so this should result in DropDown's selection being cleared, while the latter keeps selection, meaning this should not affect the DropDown control's selection.
Marked as minor bug since huge selections like this is very rare.
The text was updated successfully, but these errors were encountered:
Severity: With 1.500 selected nodes (test data: data2.json.zip) the problem is barely noticeable. Testet on a MacBook Pro 2017 with a 2.8 Ghz Core i7 CPU in Chrome v. 103.
Throttling the browser by 6x using Developer Tools makes it less responsive but it is absolutely still usable.
Selecting 1500 items in a DropDown control is also considered an unlikely use case. I'm removing the "minor bug" label.
FlowIT-JIT
changed the title
DropDown: Switching to TreeView is extremely slow when DropDown contains huge selection
DropDown: Switching to TreeView is extremely slow when DropDown contains huge selection (15.000+)
Aug 17, 2022
See the following example: https://jsfiddle.net/475aobj9/2/
Example data can be found in data6.json.zip - make sure to update the URL on line 4:
dd.Url("data6.json");
When working with huge amounts of selected items in a DropDown control, switching to the TreeView picker is painfully slow, which the example demonstrates.
Open the DropDown control and choose "Show available options". 16.000+ TreeView nodes will be loaded and selected. Now close the DropDown control, open it again, and click "Show available options" again - notice how long it takes for the TreeView to emerge.
This is due to the fact that selections in the DropDown control is synchronized to the picker control when it is made the active picker, in case the picker was not initially assigned to the DropDown control prior to assigning a value to the DropDown control:
Fit.UI/Controls/DropDown/DropDown.js
Line 769 in 28ae44d
Most often we only need to do this the very first time a picker control is assigned to the DropDown control - and remember that any number of pickers might be used with the DropDown control, so we would need a flag for each individual picker control assigned!
Do make sure that changing selected state on picker controls directly does not cause new problems, if synchronization is only done once going forward. What happens if we call
Clear()
directly on the picker? Ideally it synchronizes the change back to the DropDown (expected), but it can not be allowed to cause inconsistency between the DropDown's selection and the picker's selection.Also try invoking
dropdown.GetTreeView().Reload(false)
anddropdown.GetTreeView().Reload(true)
on an instance of WSDropDown. The first will not restore selected nodes, so this should result in DropDown's selection being cleared, while the latter keeps selection, meaning this should not affect the DropDown control's selection.Marked as minor bug since huge selections like this is very rare.
The text was updated successfully, but these errors were encountered: