Bug 83557 - Control.setBackground(Color) seems slow
Summary: Control.setBackground(Color) seems slow
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Billy Biggs CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2005-01-24 13:54 EST by Grant Gayed CLA
Modified: 2005-02-23 20:44 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Gayed CLA 2005-01-24 13:54:53 EST
See
  project: org.eclipse.swt.tests
  class: 
org.eclipse.swt.tests.junit.performance.Test_org_eclipse_swt_widgets_Control
  method: test_setBackgroundLorg_eclipse_swt_graphics_Color

The number of test runs in the first line of this method is much smaller on GTK 
because it was taking far too long to run with the original (non-GTK) iteration 
count.  With this original count (2000000), the test was taking > 51 minutes to 
run on gtk, while it took < 2 seconds to run on win32.  My win32 machine is a 
little faster than my linux machine, but not by much.
Comment 1 Billy Biggs CLA 2005-01-24 15:19:55 EST
Note: This was done more specifically on a Button.
Comment 2 Billy Biggs CLA 2005-02-23 20:44:41 EST
This comparison is invalid.  Windows is deferring the colour lookup until a
paint occurs, while on GTK+ we set the colour in the OS and update the style.