| Summary: | Virtual/lazy TreeViewer creates all grandchildren of expanded nodes | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Jan Koehnlein <jan> |
| Component: | UI | Assignee: | Platform-UI-Inbox <Platform-UI-Inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | hsoliwal |
| Version: | 3.6 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
*** This bug has been marked as a duplicate of bug 266189 *** |
If you call expandNodes() on a TreeViewer with a ILazyTreeContentProvider and a SWT.VIRTUAL Tree that contains virutal nodes, the tree viewer will expand all grandchildren of the nodes to be expanded. This can cause a serious performance/memory penalty, as virtual trees are meant to create their tree items only on demand. Reason is that internalSetExpand() recursively calls itself when the data on an item is null, which is the case for virtual nodes. Then all grandchildren will be created. Workaround for me was to implement my own TreeProvider and move the if (expandedElements.size() > 0) { internalSetExpanded(expandedElements, item); } one line up into the if(date != null) block.