Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8005540

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

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • 8
    • 8
    • infrastructure
    • 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.

      Attachments

        Activity

          People

            erikj Erik Joelsson
            erikj Erik Joelsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: