Bug 47443 - All projects touched on startup
Summary: All projects touched on startup
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M6   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-25 11:43 EST by John Arthorne CLA
Modified: 2003-12-17 10:26 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2003-11-25 11:43:44 EST
3.0 M5

While investigating builder performance, I noticed that every project was being
built on the first incremental build after startup.  This is with a source
workspace containing all platform core plug-in projects, which use classpath
containers.  After some investigation I discovered this is because classpath
container intialization is calling IResource.touch() on all projects during
startup. I know that touch is necessary when containers have changed, but is it
possible to detect in this case that the container values have not changed?  The
stack is very deep due to bug 47213, but here is the top of the stack where
touch is being called:

Project(Resource).touch(IProgressMonitor) line: 1250
Project.touch(IProgressMonitor) line: 868
JavaCore$5.run(IProgressMonitor) line: 3126
BatchOperation.executeOperation() line: 34
BatchOperation(JavaModelOperation).execute() line: 367
BatchOperation(JavaModelOperation).run(IProgressMonitor) line: 706
Workspace.run(IWorkspaceRunnable, ISchedulingRule, int, IProgressMonitor) line: 1554
Workspace.run(IWorkspaceRunnable, IProgressMonitor) line: 1573
JavaCore.run(IWorkspaceRunnable, IProgressMonitor) line: 2975
JavaCore.setClasspathContainer(IPath, IJavaProject[], IClasspathContainer[],
IProgressMonitor) line: 3101
JREContainerInitializer.initialize(IPath, IJavaProject) line: 51
JavaCore$1.run() line: 1067
InternalPlatform.run(ISafeRunnable) line: 1127
Platform.run(ISafeRunnable) line: 464
Comment 1 Philipe Mulet CLA 2003-11-26 06:46:18 EST
Good point. We can indeed only force to touch the project if classpath is 
indeed changing in the set of package fragment root.

Achieved by moving #touch call into the SetClasspathOperation, when we detect 
roots have changed. This will also touch in case the classpath is really 
modified, but then the extra project touch has no incidence since 
the .classpath file is likely modified as well.
Comment 2 Philipe Mulet CLA 2003-11-26 09:58:14 EST
Still troubles coming from source attachments on startup.
Comment 3 Philipe Mulet CLA 2003-11-26 17:40:23 EST
Addressed source attachment issue as well by no longer relying on a delta to 
cause reset of source root path inference mechanism. This actually improves 
quite a bit our performance on startup as we don't broadcast unnecessary deltas 
any longer when reattaching identical sources (in root path inferring mode).

Comment 4 Philipe Mulet CLA 2003-11-26 17:40:42 EST
Fixed.
Comment 5 David Audel CLA 2003-12-17 10:26:05 EST
Verified for 3.0M6