Review Request: 8005540: build-infra: Improve incremental build speed on windows by caching find results

Erik Joelsson erik.joelsson at oracle.com
Thu Dec 27 16:30:26 UTC 2012


A few weeks back, I did some experiments with find on windows/cygwin. 
File caching is not nearly as efficient as on linux, combined with slow 
forks this makes repeated runs of find over the same set of files very 
inefficient. This pattern is used a lot in the new makefiles for finding 
sources.

Make variables and filters are very efficient and fast however, so in 
many cases, we can replace $(shell find ...) expressions with $(filter ) 
expressions over previous find results. To make this as transparent as 
possible, I've implemented two macros, one for filling the cache and one 
for potentially using it, if the correct set of directories are in the 
cache, and otherwise revert to $(shell find). This works pretty well and 
reduces the time to run make a second time quite a lot. The trick is to 
initiate the cache with a good set of directories at the top of each 
affected makefile.

In addition to this, some more optimization of removing unneeded 
$(shell) expressions has been done.

http://cr.openjdk.java.net/~erikj/8005540/webrev.01/

/Erik



More information about the build-dev mailing list