Bug 9628 - Switching JRE is slow
Summary: Switching JRE is slow
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:
Depends on:
Blocks:
 
Reported: 2002-02-13 10:30 EST by Jerome Lanneluc CLA
Modified: 2002-04-16 07:44 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Lanneluc CLA 2002-02-13 10:30:20 EST
Build 20020212

When switching the default JRE (Preferences->Java->Installed JREs), there is a 
long delay after you press OK.

Indexing seems to be taking all CPU. It should take minimal CPU (e.g. sleep for 
1 second between each job). Only if a client is waiting for indexes, it should 
take maximum CPU.

Other improvement would be to not even check if the index of a jar file is 
consistent if its timestamp has not changed. Right now we still open the jar to 
get all its entries and see if one is missing from the index.
Comment 1 Philipe Mulet CLA 2002-04-03 08:55:08 EST
We also need to improve the SetClasspathOperation involved in there. 
Having 5 projects in my workspace:
P1 
P2 prereqs P1
P3 prereqs P2, P1
P4 prereqs P2, P1
P5 prereqs P3, P2, P1

Changing JRE settings, trigger too many SetClasspathOperations (should be 
exactly 5 occurrences).


SetClasspathOperation
 - classpath : { /P5/src[CPE_SOURCE][K_SOURCE][isExported:false], JRE_LIB
[CPE_VARIABLE][K_SOURCE][sourcePath:JRE_SRC][rootPath:JRE_SRCROOT]
[isExported:false], /P1[CPE_PROJECT][K_SOURCE][isExported:false], /P3
[CPE_PROJECT][K_SOURCE][isExported:false], /P2[CPE_PROJECT][K_SOURCE]
[isExported:false]
 - output location : <Reuse Existing Output Location>
SetClasspathOperation
 - classpath : { /P4/src[CPE_SOURCE][K_SOURCE][isExported:false], JRE_LIB
[CPE_VARIABLE][K_SOURCE][sourcePath:JRE_SRC][rootPath:JRE_SRCROOT]
[isExported:false], /P2[CPE_PROJECT][K_SOURCE][isExported:false], /P1
[CPE_PROJECT][K_SOURCE][isExported:false]
 - output location : <Reuse Existing Output Location>
SetClasspathOperation
 - classpath : { /P3/src[CPE_SOURCE][K_SOURCE][isExported:false], JRE_LIB
[CPE_VARIABLE][K_SOURCE][sourcePath:JRE_SRC][rootPath:JRE_SRCROOT]
[isExported:false], /P1[CPE_PROJECT][K_SOURCE][isExported:false], /P2
[CPE_PROJECT][K_SOURCE][isExported:false]
 - output location : <Reuse Existing Output Location>
SetClasspathOperation
 - classpath : { /P2/src[CPE_SOURCE][K_SOURCE][isExported:false], JRE_LIB
[CPE_VARIABLE][K_SOURCE][sourcePath:JRE_SRC][rootPath:JRE_SRCROOT]
[isExported:false], /P1[CPE_PROJECT][K_SOURCE][isExported:false]
 - output location : <Reuse Existing Output Location>
SetClasspathOperation
 - classpath : { /P1/src[CPE_SOURCE][K_SOURCE][isExported:false], JRE_LIB
[CPE_VARIABLE][K_SOURCE][sourcePath:JRE_SRC][rootPath:JRE_SRCROOT]
[isExported:false]
 - output location : <Reuse Existing Output Location>
SetClasspathOperation
 - classpath : { /P5/src[CPE_SOURCE][K_SOURCE][isExported:false], JRE_LIB
[CPE_VARIABLE][K_SOURCE][sourcePath:JRE_SRC][rootPath:JRE_SRCROOT]
[isExported:false], /P1[CPE_PROJECT][K_SOURCE][isExported:false], /P3
[CPE_PROJECT][K_SOURCE][isExported:false], /P2[CPE_PROJECT][K_SOURCE]
[isExported:false]
 - output location : <Reuse Existing Output Location>
SetClasspathOperation
 - classpath : { /P4/src[CPE_SOURCE][K_SOURCE][isExported:false], JRE_LIB
[CPE_VARIABLE][K_SOURCE][sourcePath:JRE_SRC][rootPath:JRE_SRCROOT]
[isExported:false], /P2[CPE_PROJECT][K_SOURCE][isExported:false], /P1
[CPE_PROJECT][K_SOURCE][isExported:false]
 - output location : <Reuse Existing Output Location>
SetClasspathOperation
 - classpath : { /P3/src[CPE_SOURCE][K_SOURCE][isExported:false], JRE_LIB
[CPE_VARIABLE][K_SOURCE][sourcePath:JRE_SRC][rootPath:JRE_SRCROOT]
[isExported:false], /P1[CPE_PROJECT][K_SOURCE][isExported:false], /P2
[CPE_PROJECT][K_SOURCE][isExported:false]
 - output location : <Reuse Existing Output Location>
SetClasspathOperation
 - classpath : { /P2/src[CPE_SOURCE][K_SOURCE][isExported:false], JRE_LIB
[CPE_VARIABLE][K_SOURCE][sourcePath:JRE_SRC][rootPath:JRE_SRCROOT]
[isExported:false], /P1[CPE_PROJECT][K_SOURCE][isExported:false]
 - output location : <Reuse Existing Output Location>
SetClasspathOperation
 - classpath : { /P1/src[CPE_SOURCE][K_SOURCE][isExported:false], JRE_LIB
[CPE_VARIABLE][K_SOURCE][sourcePath:JRE_SRC][rootPath:JRE_SRCROOT]
[isExported:false]
 - output location : <Reuse Existing Output Location>
SetClasspathOperation
 - classpath : { /P5/src[CPE_SOURCE][K_SOURCE][isExported:false], JRE_LIB
[CPE_VARIABLE][K_SOURCE][sourcePath:JRE_SRC][rootPath:JRE_SRCROOT]
[isExported:false], /P1[CPE_PROJECT][K_SOURCE][isExported:false], /P3
[CPE_PROJECT][K_SOURCE][isExported:false], /P2[CPE_PROJECT][K_SOURCE]
[isExported:false]
 - output location : <Reuse Existing Output Location>
SetClasspathOperation
 - classpath : { /P4/src[CPE_SOURCE][K_SOURCE][isExported:false], JRE_LIB
[CPE_VARIABLE][K_SOURCE][sourcePath:JRE_SRC][rootPath:JRE_SRCROOT]
[isExported:false], /P2[CPE_PROJECT][K_SOURCE][isExported:false], /P1
[CPE_PROJECT][K_SOURCE][isExported:false]
 - output location : <Reuse Existing Output Location>
SetClasspathOperation
 - classpath : { /P3/src[CPE_SOURCE][K_SOURCE][isExported:false], JRE_LIB
[CPE_VARIABLE][K_SOURCE][sourcePath:JRE_SRC][rootPath:JRE_SRCROOT]
[isExported:false], /P1[CPE_PROJECT][K_SOURCE][isExported:false], /P2
[CPE_PROJECT][K_SOURCE][isExported:false]
 - output location : <Reuse Existing Output Location>
SetClasspathOperation
 - classpath : { /P2/src[CPE_SOURCE][K_SOURCE][isExported:false], JRE_LIB
[CPE_VARIABLE][K_SOURCE][sourcePath:JRE_SRC][rootPath:JRE_SRCROOT]
[isExported:false], /P1[CPE_PROJECT][K_SOURCE][isExported:false]
 - output location : <Reuse Existing Output Location>
SetClasspathOperation
 - classpath : { /P1/src[CPE_SOURCE][K_SOURCE][isExported:false], JRE_LIB
[CPE_VARIABLE][K_SOURCE][sourcePath:JRE_SRC][rootPath:JRE_SRCROOT]
[isExported:false]
 - output location : <Reuse Existing Output Location>
SetClasspathOperation
 - classpath : { /P5/src[CPE_SOURCE][K_SOURCE][isExported:false], JRE_LIB
[CPE_VARIABLE][K_SOURCE][sourcePath:JRE_SRC][rootPath:JRE_SRCROOT]
[isExported:false], /P1[CPE_PROJECT][K_SOURCE][isExported:false], /P3
[CPE_PROJECT][K_SOURCE][isExported:false], /P2[CPE_PROJECT][K_SOURCE]
[isExported:false]
 - output location : <Reuse Existing Output Location>
SetClasspathOperation
 - classpath : { /P4/src[CPE_SOURCE][K_SOURCE][isExported:false], JRE_LIB
[CPE_VARIABLE][K_SOURCE][sourcePath:JRE_SRC][rootPath:JRE_SRCROOT]
[isExported:false], /P2[CPE_PROJECT][K_SOURCE][isExported:false], /P1
[CPE_PROJECT][K_SOURCE][isExported:false]
 - output location : <Reuse Existing Output Location>
SetClasspathOperation
 - classpath : { /P3/src[CPE_SOURCE][K_SOURCE][isExported:false], JRE_LIB
[CPE_VARIABLE][K_SOURCE][sourcePath:JRE_SRC][rootPath:JRE_SRCROOT]
[isExported:false], /P1[CPE_PROJECT][K_SOURCE][isExported:false], /P2
[CPE_PROJECT][K_SOURCE][isExported:false]
 - output location : <Reuse Existing Output Location>
SetClasspathOperation
 - classpath : { /P2/src[CPE_SOURCE][K_SOURCE][isExported:false], JRE_LIB
[CPE_VARIABLE][K_SOURCE][sourcePath:JRE_SRC][rootPath:JRE_SRCROOT]
[isExported:false], /P1[CPE_PROJECT][K_SOURCE][isExported:false]
 - output location : <Reuse Existing Output Location>
SetClasspathOperation
 - classpath : { /P1/src[CPE_SOURCE][K_SOURCE][isExported:false], JRE_LIB
[CPE_VARIABLE][K_SOURCE][sourcePath:JRE_SRC][rootPath:JRE_SRCROOT]
[isExported:false]
 - output location : <Reuse Existing Output Location>
Comment 2 Philipe Mulet CLA 2002-04-03 09:28:55 EST
New traces show 15 classpath settings instead of 20 (?).
Anyway, 15 updates is 3 var x 5 projects, due to the JRE var trio.
These variables should be allowed to be set simultaneously to avoid multiple 
refreshes.
Comment 3 Philipe Mulet CLA 2002-04-03 11:29:17 EST
Added facility to update multiple variables at once, when using it, the number 
of classpath setting operations is down to 5 (once per project).

Comment 4 Philipe Mulet CLA 2002-04-16 07:44:44 EDT
Also fixed the JRE variable updating scenario to avoid updating cycle markers 
if variable could not denote a project name.

Fixed