Bug 324388 - Virtual/lazy TreeViewer creates all grandchildren of expanded nodes
Summary: Virtual/lazy TreeViewer creates all grandchildren of expanded nodes
Status: CLOSED DUPLICATE of bug 266189
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-03 06:07 EDT by Jan Koehnlein CLA
Modified: 2010-09-03 06:42 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Koehnlein CLA 2010-09-03 06:07:43 EDT
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.
Comment 1 Hitesh CLA 2010-09-03 06:42:30 EDT

*** This bug has been marked as a duplicate of bug 266189 ***