Summary: | [classpath] n^2 classpath computations | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | John Arthorne <john.arthorne> | ||||
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | Mike_Wilson, mlists, panagiotis.korros, Tod_Creasey | ||||
Version: | 3.0 | Keywords: | performance | ||||
Target Milestone: | 3.1 M7 | ||||||
Hardware: | PC | ||||||
OS: | Windows 2000 | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
John Arthorne
2004-06-14 17:29:19 EDT
Created attachment 12090 [details]
Profiler output of classpath computation
Relevant call trace: JavaProject.computeExpandedClasspath(ClasspathEntry, boolean, boolean, HashSet, ObjectVector, Map, Map) line: 422 JavaProject.computeExpandedClasspath(ClasspathEntry, boolean, boolean, HashSet, ObjectVector, Map, Map) line: 455 JavaProject.getExpandedClasspath(boolean, boolean, Map, Map) line: 1454 JavaProject.getExpandedClasspath(boolean) line: 1433 DeltaProcessor.addDependentProjects(IPath, HashSet) line: 277 DeltaProcessor.resetProjectCaches() line: 1703 DeltaProcessor.processResourceDelta(IResourceDelta) line: 1642 DeltaProcessor.resourceChanged(IResourceChangeEvent) line: 1783 DeltaProcessingState.resourceChanged(IResourceChangeEvent) line: 414 NotificationManager$2.run() line: 283 InternalPlatform.run(ISafeRunnable) line: 616 Platform.run(ISafeRunnable) line: 747 NotificationManager.notify(ResourceChangeListenerList$ListenerEntry[], IResourceChangeEvent, boolean) line: 277 NotificationManager.broadcastChanges(ElementTree, int, boolean) line: 151 Workspace.broadcastChanges(int, boolean) line: 172 Workspace.endOperation(ISchedulingRule, boolean, IProgressMonitor) line: 901 Workspace.run(IWorkspaceRunnable, ISchedulingRule, int, IProgressMonitor) line: 1683 NotificationManager$NotifyJob.run(IProgressMonitor) line: 38 Worker.run() line: 66 If this is not a performance issue please remove the performance keyword as we are now tracking these more closely. Looks like a perfomance issue to me. Adding my name to the cc list as we are now tracking performance issues more closely. Please remove the performance keyword if this is not a performance bug. Changed SetClasspathOperation#updateAffectedProjects(IPath) to ignore projects than are not in the JavaModelCache as their namelookup cache doesn't need to be updated. Are there outstanding work items for this bug? Yes, I need to do some measurement to see the gain of my last change, and maybe optimize other call to computeExpandedClasspath. Changed DeltaProcessor to compute a light weight dependency map (during DeltaProcessingState#initializeRoots()) instead of using getExpandedClasspath() which is expensive. In my monster workspace (more than 1000 plugins) resetting the project caches during delta processing used to take 85,000ms after a crash (0ms in case of no crash). It now takes 10ms after a crash (and still 0ms in case of no crash). Verified for 3.1 M7 using build I20050513-0010. |