Bug 12614 - Initializing JRE variables slow on plug-in activation
Summary: Initializing JRE variables slow on plug-in activation
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M5   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2002-04-02 09:57 EST by Tod Creasey CLA
Modified: 2002-04-09 10:19 EDT (History)
1 user (show)

See Also:


Attachments
Profiling switch to Java perspective (372.44 KB, text/html)
2002-04-04 10:28 EST, Philipe Mulet CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tod Creasey CLA 2002-04-02 09:57:34 EST
When I do the following

1) Start with fresh workbench
2) Turn off the auto build preference
3) Import all of Eclipse using the plugin importer including source
4) Switch to the hava Perspective

The method org.eclipse.jdt.core.JavaCore.setClasspath variable takes 38222 ms.

updateCycleMarkers takes 30 268 ms of this time.

Please note that these times were gathered using the OptimizeIt tool - 
benchmarking with a stopwatch indicates that the same operation takes 16 
instead of 38 ms without the profiler.
Comment 1 Philipe Mulet CLA 2002-04-03 05:56:57 EST
This is likely due to the model refresh underneath, triggered by the classpath 
setting operations. We want to revisit this code anyway.
Comment 2 Philipe Mulet CLA 2002-04-03 11:39:34 EST
Added a classpath variable setting API allowing to initialize multiple 
variables at once. In this particular scenario, it will mean 3 times less 
classpath updates.

Need to investigate more to see actual times with new behavior.

Also: clients of JavaCore#setClasspathVariable should adopt the new API 
(JavaCore#setClasspathVariables).
Comment 3 Philipe Mulet CLA 2002-04-04 07:05:47 EST
When running the same test case, I am numbers which aren't so bad.
I am in particular seeing 70% of the time inside:

org.eclipse.core.internal.boot.DelegatingURLClassLoader.findClassParents()
see attached profile.
Comment 4 Philipe Mulet CLA 2002-04-04 10:28:17 EST
Created attachment 545 [details]
Profiling switch to Java perspective
Comment 5 Philipe Mulet CLA 2002-04-05 12:40:19 EST
Performed some changes to improve the performance of multi-variable updates, 
but even without it, I still cannot reproduce the original numbers.

Also funaced the too many path canonicalizations (internal calls do not need 
it).

Tod - can you reproduce these numbers after next integration build ?
Comment 6 Philipe Mulet CLA 2002-04-09 10:19:34 EDT
Consider fixed, unless symptoms are reproduceable.