Community
Participate
Working Groups
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%
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.