Bug 4946 - Cross-project builder efficiency issues
Summary: Cross-project builder efficiency issues
Status: RESOLVED WORKSFORME
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 M4   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-12 16:06 EDT by John Arthorne CLA
Modified: 2002-03-13 11:21 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 2001-10-12 16:06:32 EDT
In response to another PR (3137), I have been investigating builder performance 
for the following scenario:

- user has a large workspace, many projects with many interdependencies
- user makes a small, localized change
- user waits a long time for the build to happen.

The core side was largely guilty for this, as it was naively recomputing deltas 
as demanded by each builder.  For example, with 70 projects, each project 
dependent on about 5 other projects, 350 deltas were being generated.  I have 
made a number of improvements in core, and the time spent in core code for this 
case has dropped from the 30-50% range to under 2%.

However, I think there are probably similar improvents that can be made on the 
javabuilder side.  Consider the following case:

- A workspace with most of eclipse platform source and tests (65 projects).
- Edit a comment in any file in org.eclipse.core.runtime
    (which many projects depend on)
- Build takes about 2 seconds on a very fast machine.

Cases like these are very common (if you're on the core team ;), and I'm sure 
there is room for improvement.  Much of the time is spent in the following 
methods (these numbers are after my core optimizations):

JavaBuilder#classpathChanged() (22%)
IncrementalImageBuilder#computeAllPackages (23%)
IncrementalImageBuilder#computeNamespaceChanges (21%)

Sum of all time in JavaBuilder (excluding delta comp): 95%
Comment 1 Kent Johnson CLA 2002-03-06 17:49:05 EST
With the new builder, we only ask for deltas for prereq projects and have 
optimized the comment case... dependent projects skip the prereq project's 
delta since it did not include a structural change.

In my test workspace, which consists of all the eclipse projects from source, 
simple comment changes in org.eclipse.core.boot take less than a second once 
build states have been read.