Community
Participate
Working Groups
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
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.
Still troubles coming from source attachments on startup.
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).
Fixed.
Verified for 3.0M6