Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 340839

Summary: [Tree][Table] Disable scroll calculations when redraw flag is down
Product: [RT] RAP Reporter: Kaloyan Radev <k.radev>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: fr.appel
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch file for org.eclipse.swt.widgets.Tree.java, based on RAPv.1.3.2 none

Description Kaloyan Radev CLA 2011-03-24 06:19:19 EDT
Build Identifier: 1.3.2

When working with relatively moderate amount of data (200-500 entries) in a tree with few columns and non-lazy provider, the calculations performed in updateScrollBars() method (called for every tree item) take 70-80% of the CPU time. They are called on every tree item creation and in case custom images, theming and so on are present it seems that this calculations may triple the data loading time and even leave the impression of non-responding UI for at least few seconds. The suggestion here is to be applied the safest change - the flag from setRedraw(boolean) method to be connected with the updateScrollBars().

P.S. In 1.4M5 there is an option to set a SWT.NO_SCROLL which actually is not what I want - I want having a scrollbar but their values to be calculated only once for setting of tree elements.

Reproducible: Always
Comment 1 Kaloyan Radev CLA 2011-03-24 06:24:05 EDT
Created attachment 191815 [details]
Patch file for org.eclipse.swt.widgets.Tree.java, based on RAPv.1.3.2
Comment 2 Frank Appel CLA 2011-04-06 07:48:37 EDT
Kaloyan,

could you please have a look at https://bugs.eclipse.org/bugs/show_bug.cgi?id=341714. I think this could be related to your problem here. I'm suggesting a different approach to solve the problem, but it would be nice if you could check whether the attached patch of the mention bug improves the situation for you too.