Bug 27555 - [startup] PackageFragmentRoot - source attached too early (?)
Summary: [startup] PackageFragmentRoot - source attached too early (?)
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M4   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2002-12-03 05:43 EST by Adam Kiezun CLA
Modified: 2002-12-19 05:00 EST (History)
0 users

See Also:


Attachments
attachSource on first expansion of a java project (10.63 KB, text/plain)
2002-12-03 05:47 EST, Adam Kiezun CLA
no flags Details
attachSource on first switch to java (19.48 KB, text/plain)
2002-12-03 09:15 EST, Adam Kiezun CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2002-12-03 05:43:18 EST
20021127
PackageFragmentRoot calls attachSource on openWhenClosed
which happens in the following scenario:

1. 'collapse all' in package explorer
2. restart eclipse
3. expand one project (i tried a source project - probably true for any)
4. you wait a long time and 40% of that time is spent on attaching source to a 
binary file that you have not touched yet

will attach profile
Comment 1 Adam Kiezun CLA 2002-12-03 05:47:24 EST
Created attachment 2620 [details]
attachSource on first expansion of a java project
Comment 2 Adam Kiezun CLA 2002-12-03 09:15:07 EST
Created attachment 2623 [details]
attachSource on first switch to java

the same thing is responsible for 19% of time need to switch to java
perspective the frist time
Comment 3 Jerome Lanneluc CLA 2002-12-06 05:31:18 EST
I even think that the guilty code is earlier: 
JavaProjectElementInfo.computeNonJavaResources() calls 
JavaProject.findPackageFragment0() which forces the opening of all package 
fragment roots of the project.
Comment 4 Jerome Lanneluc CLA 2002-12-06 11:04:24 EST
Entered bug 27840 for the JavaProjectElementInfo.computeNonJavaResources().

We can still avoid to attach the source too early as described in this bug.
Comment 5 Jerome Lanneluc CLA 2002-12-09 07:01:41 EST
Changed implementation to lazy initialize SourceMapper.
Comment 6 David Audel CLA 2002-12-19 05:00:48 EST
Verified.