Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340839 - [Tree][Table] Disable scroll calculations when redraw flag is down
Summary: [Tree][Table] Disable scroll calculations when redraw flag is down
Status: NEW
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-24 06:19 EDT by Kaloyan Radev CLA
Modified: 2011-04-06 07:48 EDT (History)
1 user (show)

See Also:


Attachments
Patch file for org.eclipse.swt.widgets.Tree.java, based on RAPv.1.3.2 (569 bytes, patch)
2011-03-24 06:24 EDT, Kaloyan Radev CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.