Details
-
Bug
-
Resolution: Fixed
-
P3
-
8
-
b74
Description
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.
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.
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.