Bug 552155 - [Viewers] TreeViewer performance issues with lazy loading content provider
Summary: [Viewers] TreeViewer performance issues with lazy loading content provider
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.9   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: helpwanted, performance
Depends on:
Blocks:
 
Reported: 2019-10-16 11:51 EDT by siva ganesh CLA
Modified: 2021-11-22 12:23 EST (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description siva ganesh CLA 2019-10-16 11:51:52 EDT
We are using lazyLoading content provider with JFace TreeViewer.
when the the no of nodes in the tree is more than > 10000. even the scroll is also taking more time and hanging.

i have observed that the viewer.replace itself is taking more than (10s).

public void updateElement(Object parent, int index) {
   long startTime=System.currentTimeMillis();
                viewer.replace(parent, index, element);
                System.out.println("Node time viewer.replace"+index +" : "+ (System.currentTimeMillis()-startTime));
}

could any one suggest me how to improve the performance of the same.
Comment 1 Andrey Loskutov CLA 2019-10-16 15:35:34 EDT
Please try with 4.13 version.
Comment 2 siva ganesh CLA 2019-10-17 01:45:57 EDT
(In reply to Andrey Loskutov from comment #1)
> Please try with 4.13 version.

is this issue fixed in 4.13 version? 
is there any bug mentioned this issue, Please share me the BUG id.
Comment 3 Andrey Loskutov CLA 2019-10-17 01:54:34 EDT
(In reply to siva ganesh from comment #2)
> (In reply to Andrey Loskutov from comment #1)
> > Please try with 4.13 version.
> 
> is this issue fixed in 4.13 version? 

To verify that, please try with 4.13 or even 4.14 M1, because there will be no patch for 4.9 anymore.
Comment 4 siva ganesh CLA 2019-10-17 08:50:23 EDT
(In reply to Andrey Loskutov from comment #3)
> (In reply to siva ganesh from comment #2)
> > (In reply to Andrey Loskutov from comment #1)
> > > Please try with 4.13 version.
> > 
> > is this issue fixed in 4.13 version? 
> 
> To verify that, please try with 4.13 or even 4.14 M1, because there will be
> no patch for 4.9 anymore.

Tried in 4.13 & 4.14M also taking same time. Performance not improved.
Comment 5 Andrey Loskutov CLA 2019-10-18 05:20:55 EDT
(In reply to siva ganesh from comment #4)
> Tried in 4.13 & 4.14M also taking same time. Performance not improved.

Thanks for verifying that. Can you attach some example project showing performance issue?
Comment 6 Eclipse Genie CLA 2021-11-19 15:41:07 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 7 Wim Jongman CLA 2021-11-22 12:23:25 EST
(In reply to siva ganesh from comment #0)
> We are using lazyLoading content provider with JFace TreeViewer.
> when the the no of nodes in the tree is more than > 10000. even the scroll
> is also taking more time and hanging.

It looks like a memory/GC issue.


The lazy viewer is kind of a misused beast. When you set the size (to 10000+) then the viewer is creating that many stub items. One reason, I guess, is to get the scrollbar dimensions correct. 

Then on lazy read, the stub items are replaced for real items.

One strategy is that you should not set that many items because the user will never page through that list all the way through 10000+ items. Instead, you can try to never show more items than are visible to the user. 

If that is too complex, just set your maximum to 5k items and provide filtering/selecting to give the user what they want to see. 

Also, in the nebula project there are alternative faster viewer implementations like Nattable and Grid.

  
> i have observed that the viewer.replace itself is taking more than (10s).

Did you use setUseHashLookup(true)?