Bug 101613 - Performance regressions in Open Type Hierarchy performance test
Summary: Performance regressions in Open Type Hierarchy performance test
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 RC4   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-24 06:40 EDT by Tobias Widmer CLA
Modified: 2005-06-24 16:11 EDT (History)
2 users (show)

See Also:


Attachments
trace for M7 (11.14 KB, application/x-zip-compressed)
2005-06-24 06:41 EDT, Tobias Widmer CLA
no flags Details
trace for I20050624 (10.53 KB, application/x-zip-compressed)
2005-06-24 06:41 EDT, Tobias Widmer CLA
no flags Details
Changed IndexBasedBuilder#createInfofFromClassFileInJar(...) to use the OS path in the case of external jars (1.83 KB, patch)
2005-06-24 10:37 EDT, Jerome Lanneluc CLA
no flags Details | Diff
performance results with reboot (1.99 KB, text/plain)
2005-06-24 11:00 EDT, Tobias Widmer CLA
no flags Details
performance results without reboot (1.99 KB, text/plain)
2005-06-24 11:07 EDT, Tobias Widmer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Widmer CLA 2005-06-24 06:40:05 EDT
After I20050610, it seems that CreateTypeHierarchyOperation has become 
significantly slower (around 20%).

Although JDT UI has done some improvements in the rendering code, our 
performance test 
org.eclipse.jdt.ui.tests.performance.views.TypeHierarchyPerfTest#testOpenObject
Hierarchy2() (Win XP Sun 1.4.2_08 (2 GHz 512 MB)) is 24% red

Doing a diff on traces for M7 and I20050624 shows that the performance loss 
originates in CreateTypeHierarchyOperation#execute

Attaching traces
Comment 1 Tobias Widmer CLA 2005-06-24 06:41:08 EDT
Created attachment 23933 [details]
trace for M7
Comment 2 Tobias Widmer CLA 2005-06-24 06:41:51 EDT
Created attachment 23934 [details]
trace for I20050624
Comment 3 Frederic Fusier CLA 2005-06-24 07:09:10 EDT
We also have a test for type hierarchy performance and it's the most stable of
our performance tests.
Have a look at
http://fullmoon.torolab.ibm.com/downloads/drops/S-3.1RC3-200506171618/performance/org.eclipse.jdt.core.php?

JDT/Core performance tests results for RC3, test "Type Hierarchy>All Types"
never vary more than 4% on all test boxes since I20050506 (2 of them variation
is less than 1%).

This test get all classes for org.eclipse.jdt.internal.compiler.ast.ASTNode
which is 154 classes.

Note also that your test is only red on this performance test box. It is OK on
other ones. So, all these observations would imply that JDT/Core code is not
really involved there (otherwise how this test result can be OK on other test
boxes?)...

Last point about differences with your Yourkit traces, we already noticed that
yourkit time measuring is specially bad and should not be used to compare
performances...
Comment 4 Tobias Widmer CLA 2005-06-24 07:19:34 EDT
I also had a look at the JDT Core performance tests. However, there are a few 
differences:
- JDT Core averages the results over several runs, the test mentioned in 
comment 0 is a warm test measured only once after the cold one
- JDT UI creates the type hierarchy on java.lang.Object to get reasonable 
input for the rendering code

It's true that the performance test is only red on the slower windows box. 
Since the performance constantly seems to be slower since shortly before RC2, 
it may be worth to have a look at it, since the scenarios surely are quite 
different.
Comment 5 Frederic Fusier CLA 2005-06-24 10:28:42 EDT
Finally, it seems that you point a real problem Tobias...
This is a side effect of bug 98378 fix.
We also need to add some test in FullSourceWorkspaceTypeHierarchyTests to be
able to see this kind of changes.
Comment 6 Jerome Lanneluc CLA 2005-06-24 10:37:54 EDT
Created attachment 23945 [details]
Changed IndexBasedBuilder#createInfofFromClassFileInJar(...) to use the OS path in the case of external jars
Comment 7 Jerome Lanneluc CLA 2005-06-24 10:39:14 EDT
Tobias, can you please run your test with this patch and let us know if it
improves things ? Thanks.
Comment 8 Philipe Mulet CLA 2005-06-24 10:57:49 EDT
If we do not address it, opening type hierarchies on Win32 needs more memory/CPU
time than it should (explains perf regression on JDT/UI perf test for type
hierarchies, could also cause some out of memory issues on small configs).
Badness got introduced in RC3 as a side effect of addressing 98378 (regression
from 3.0), it changed one path format, and one client site didn't get updated,
fix is quite simple as the path change is similar to what we do on other client
sites.
Comment 9 Tobias Widmer CLA 2005-06-24 11:00:50 EDT
Created attachment 23949 [details]
performance results with reboot
Comment 10 Tobias Widmer CLA 2005-06-24 11:07:03 EDT
Created attachment 23950 [details]
performance results without reboot
Comment 11 Frederic Fusier CLA 2005-06-24 11:48:41 EDT
On one shot is really difficult to say if your results are correct. My perf
tests experience shows that deviation may be really important...
Here's a sample, I've run your test with an without patch 5 times each and get
following results:
Without	patch
test1	test2	test3
3.14	921	561
1.6	802	541
1.66	851	581
1.6	602	831
1.48	811	582
With Patch		
test1	test2	test3
1.68	580	481
1.61	671	531
1.55	620	510
1.66	581	571
1.62	601	741

My conclusion will be that patch globally solves the problem. Problem you see
with warm test is surely due to "normal" results variation on your machine (I
guess you done it on WinXP?)

As you can see on 5 iterations we got variation of 30% and 50% for small
duration tests!
Comment 12 Tobias Widmer CLA 2005-06-24 11:55:23 EDT
Yes, this is also my impression. Based on the measured results (under WinXP), 
the patch in general seems to fix the performance regression. The performance 
gap between the cold and warm performance tests on java.lang.Object are 
noticeable in RC1 as well (less caching), so the results show that the fix is 
effective.
Comment 13 Philipe Mulet CLA 2005-06-24 12:13:00 EDT
Dirk - pls vote
Comment 14 Philipe Mulet CLA 2005-06-24 12:13:15 EDT
Dani - pls vote
Comment 15 Dirk Baeumer CLA 2005-06-24 12:23:30 EDT
+1 for RC4.
Comment 16 Dani Megert CLA 2005-06-24 12:27:43 EDT
+1 for 3.1 RC4
Comment 17 Jerome Lanneluc CLA 2005-06-24 12:30:48 EDT
Thanks. Released patch from comment 6.
Comment 18 Olivier Thomann CLA 2005-06-24 16:11:39 EDT
Verified that performance are fine again.
Performance tests will validate this one later.
Verified with I20050624-1300