Bug 90330 - Resize performance on Linux in I20050125
Summary: Resize performance on Linux in I20050125
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-04-05 13:31 EDT by Michael Van Meekeren CLA
Modified: 2005-04-07 17:12 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Van Meekeren CLA 2005-04-05 13:31:21 EDT
Could you tell me whether changes went into SWT regarding layout behaviour on
linux that would slow down resize (i.e. layout) performance by almost one half.

Please see the following performance test.
http://fullmoon.ottawa.ibm.com/downloads/drops/S-3.1M6-200504011645/performance/linux/org.eclipse.ui.tests.performance.WindowResizeTest.testWindowResize_org.eclipse.ui.resourcePerspective().html#CPU%20Time

Here is a snippit of code from the test: 

        int w1 = 300;
        int h1 = 400;
        int w2 = 1000;
        int h2 = 700;
        int currentW = w1;
        int currentH = h1;
        boolean setSize1 = true;
        for (int i = 0; i < 20; i++) {
            processEvents();
            if (setSize1) {
            	currentW = w1;
            	currentH = h1;
            } else {
            	currentW = w2;
            	currentH = h2;
            }	
            setSize1 = !setSize1;
            
            startMeasuring();
            processEvents();
            shell.setSize(currentW, currentH);
         
            processEvents();
            stopMeasuring();
        	
        }
        commitMeasurements();
        assertPerformance();
Comment 1 Veronika Irvine CLA 2005-04-05 16:47:20 EDT
I guess we are talking about GTK here - adjust OS accordingly.

What kind of layout are you using?  What children are in the shell.

Nothing has changed in the way layouts are done (plus this code is platform 
independant so you would expect to see a similar slowdown on Windows) but 
there may have been changes to the way widgets respond to resizes in general 
on GTK.
Comment 2 Michael Van Meekeren CLA 2005-04-05 17:40:35 EDT
I thought you might find it interesting to see the build date where it changes
I20050125, agree that there appear to be no equivalent jumps on the windows
version of this test (see link).  

This test resizes the while workbench so the types of layouts used are many, but
most likely GridLayout as well as one TrimLayout (UI class) + others.
Comment 3 Steve Northover CLA 2005-04-05 21:59:49 EDT
Fall out from all the playing with setBounds() on GTK?  Billy and SN to 
investigate, hauling in SSQ as necessary.  I suspect getClientArea().
Comment 4 Veronika Irvine CLA 2005-04-06 06:44:36 EDT
FYI - The typical workbench window uses only TrimLayout and FillLayout.  
GridLayout is used extensively in Wizards and the Preference pages but not the 
main workbench area.
Comment 5 Billy Biggs CLA 2005-04-06 18:56:08 EDT
I downloaded 3.1M4 with the tests from M4 and 3.1M5a with the tests from M5a. 
As far as I can tell, the code for the test itself has not changed.  I cannot
reproduce the slowdown shown by the test framework though: on my machine, 3.1M5a
is 20% faster than 3.1M4 when comparing the CPU time.

I am running on FC3 with GTK+ 2.4.14.  I will try again on RHEL3 which should
more closely match the test machine.
Comment 6 Billy Biggs CLA 2005-04-07 10:27:12 EDT
3.1M5 is also about 15% faster than 3.1M4 on my machine when running under
RHEL3.  I cannot explain the results from the performance test machine.
Comment 7 Michael Van Meekeren CLA 2005-04-07 11:27:06 EDT
Here's billys setup of projects for testing this, I am going to try on my RH machine

3.1M4:

org.eclipse.test v20041208
org.eclipse.test.performance v20041123
org.eclipse.ui.tests v20041216-0010

3.1M5a:

org.eclipse.test v20050110
org.eclipse.test.performance v20050104
org.eclipse.ui.tests v20050218-1200
Comment 8 Billy Biggs CLA 2005-04-07 12:23:50 EDT
For M5a, I also needed to get org.eclipse.core.tests.harness v20050215a
Comment 9 Michael Van Meekeren CLA 2005-04-07 13:06:32 EDT
I get the following results (for CPU time in ms) running the test 3 times: 

M4 -  86 89 88
M5a -  84 77 83

NOTE: for M5a, initially the setup was running as an application (i.e. RCP) and
not a product this caused the perspective switcher to be under the main toolbar
instead of on the top right and there was a lot less coolbar wrapping, Billy
which way were you running M5a.  

Either way I think we need to go to the test machines now and find out whats fishy.
Comment 10 Michael Van Meekeren CLA 2005-04-07 15:37:28 EDT
OK, found out what is happening, the screen saver was running on the machine
before Jan 17, 2005 causing all UI type tests to be invalid.  

I'm closing this bug, will discuss with Releng how to resolve issues with bad
test results pre Jan 25.
Comment 11 Nick Edgar CLA 2005-04-07 16:10:10 EDT
Before Jan 17 or after?  Did the screen saver make the tests faster or slower ;-)?
Comment 12 Michael Van Meekeren CLA 2005-04-07 17:12:30 EDT
Before Jan 17 the screen save was running, making the tests faster.  After Jan
17, the screen saver was not running and we saw a slow down (%40) in the tests.