Bug 260848

Summary: [perfs] Regression on JDT/Core plugin initialization performance test
Product: [Eclipse Project] JDT Reporter: Frederic Fusier <frederic_fusier>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, Olivier_Thomann
Version: 3.5Keywords: performance, test
Target Milestone: 3.5 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix
none
Proposed fix none

Description Frederic Fusier CLA 2009-01-13 09:00:08 EST
The JDT/Core plugin initialization performance test (org.eclipse.jdt.core.tests.performance.FullSourceWorkspaceModelTests#testInitJDTPlugin())
shows a regression vs. baseline since the beginning of M5 perf tests.

Here are the numbers for this test:

Win XP Sun 1.5.0_10 (2 x 3.00GHz - 3GB RAM)
I20081118-1720	-13.9%
I20081119-1600	-14.1%
N20081120-2000	-13.7%
I20081125-0840	-10.0%
N20081127-2000	-2.6%
I20081209-0100	-9.3%
I20081210-0100	-8.5%
I20081211-0100	-15.5%
I20081211-1105	-15.9%
I20081211-1908	-16.3%
N20081213-2000	-15.6%
I20081216-0800	-23.7%
N20081218-2000	0.0%
N20081220-2000	-19.9%
N20090101-2000	-15.2%
N20090103-2000	-21.7%
I20090106-0800	-9.2%
N20090108-2000	-14.1%

SLED 10 Sun 1.5.0_10 (2 x 3.00GHz - 3GB RAM)
I20081118-1720	-16.5%
I20081119-1600	-14.2%
N20081120-2000	-10.3%
I20081125-0840	-13.0%
N20081127-2000	-14.2%
N20081129-2000	-12.8%
I20081202-1812	-16.6%
N20081204-2000	-22.6%
N20081206-2000	-14.1%
I20081208-0921	-13.3%
I20081209-0100	-17.8%
I20081210-0100	-13.5%
I20081211-0100	-13.4%
I20081211-1105	-16.1%
I20081211-1908	-13.0%
N20081213-2000	-13.3%
I20081216-0800	-13.5%
N20081218-2000	-10.5%
N20081220-2000	-18.6%
N20081225-2000	-13.1%
N20081227-2000	-12.8%
N20090101-2000	-12.5%
N20090103-2000	-13.3%
I20090106-0800	-13.0%
N20090108-2000	-13.3%
N20090110-2000	-17.3%

RHEL 5.0 Sun 6.0_04 (2 x 3.00GHz - 3GB RAM)
I20081118-1720	-7.7%
I20081119-1600	-10.1%
N20081120-2000	-8.1%
I20081125-0840	-8.5%
N20081127-2000	-8.4%
N20081129-2000	-8.5%
I20081202-1812	-10.5%
N20081204-2000	-8.3%
N20081206-2000	-8.3%
I20081208-0921	-8.4%
I20081209-0100	-8.1%
I20081210-0100	-8.4%
I20081211-0100	-7.7%
I20081211-1105	-8.4%
I20081211-1908	0.0%
N20081213-2000	-8.1%
I20081216-0800	-8.0%
N20081218-2000	-2.7%
N20081220-2000	-7.2%
N20081225-2000	-7.4%
N20081227-2000	-8.3%
N20090101-2000	-8.3%
N20090103-2000	-7.5%
I20090106-0800	-7.8%
N20090108-2000	-7.8%
N20090110-2000	-7.5%
Comment 1 Jerome Lanneluc CLA 2009-01-27 06:58:12 EST
Regression comes from the fact that jars on the classpath are now opened on startup to construct the resolved classpath (libraries referenced in the MANIFEST.MF are also added on the resolved classpath).
Comment 2 Jerome Lanneluc CLA 2009-01-29 12:48:07 EST
Created attachment 124171 [details]
Proposed fix
Comment 3 Jerome Lanneluc CLA 2009-01-30 05:40:43 EST
Fix released for 3.5M6
Comment 4 Olivier Thomann CLA 2009-02-03 14:56:59 EST
I think this patch breaks the ability to use ASTParser in a non-headless environment.
I get:
java.lang.ExceptionInInitializerError
	at org.eclipse.jdt.core.JavaCore.getOptions(JavaCore.java:3268)
	at org.eclipse.jdt.core.dom.ASTParser.initializeDefaults(ASTParser.java:235)
	at org.eclipse.jdt.core.dom.ASTParser.<init>(ASTParser.java:218)
	at org.eclipse.jdt.core.dom.ASTParser.newParser(ASTParser.java:118)
	at org.eclipse.pde.api.tools.internal.provisional.scanner.TagScanner.scan(TagScanner.java:509)
	at org.eclipse.pde.api.tools.model.tests.TagScannerTests.doScan(TagScannerTests.java:86)
	at org.eclipse.pde.api.tools.model.tests.TagScannerTests.testBug212276(TagScannerTests.java:128)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at junit.framework.TestCase.runTest(TestCase.java:164)
	at junit.framework.TestCase.runBare(TestCase.java:130)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:120)
	at junit.framework.TestSuite.runTest(TestSuite.java:230)
	at junit.framework.TestSuite.run(TestSuite.java:225)
	at junit.framework.TestSuite.runTest(TestSuite.java:230)
	at junit.framework.TestSuite.run(TestSuite.java:225)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.NullPointerException
	at org.eclipse.jdt.internal.core.JavaModelManager.getNonChainingJarsFile(JavaModelManager.java:2858)
	at org.eclipse.jdt.internal.core.JavaModelManager.loadNonChainingJarsCache(JavaModelManager.java:2833)
	at org.eclipse.jdt.internal.core.JavaModelManager.<init>(JavaModelManager.java:1472)
	at org.eclipse.jdt.internal.core.JavaModelManager.<clinit>(JavaModelManager.java:1012)
	... 27 more

I'll propose a patch.
Comment 5 Olivier Thomann CLA 2009-02-03 15:35:29 EST
Created attachment 124605 [details]
Proposed fix

This makes ASTParser runnable again in a non-headless environment.
Comment 6 Olivier Thomann CLA 2009-02-03 15:36:34 EST
Reopen for now as this requires more work in order to get the non-headless case under control.
Comment 7 Olivier Thomann CLA 2009-02-03 15:42:42 EST
Released the patch for next nightly build.
Jérôme, please review it.
Comment 8 Jerome Lanneluc CLA 2009-02-04 04:38:20 EST
Patch is good except that it is missing a comment explaining the reason of this code. A comment is important since I guess we cannot add a regression test for this case.
Comment 9 Jerome Lanneluc CLA 2009-02-06 09:13:56 EST
It looks like a comment was added. Marking as fixed.
Comment 10 Olivier Thomann CLA 2009-03-10 09:58:05 EDT
Verified for 3.5M6 using I20090309-0100 (checking perfs results).