Skip to content

Commit

Permalink
Associate deps cache files with the depended upon module (#6263)
Browse files Browse the repository at this point in the history
Currently the fine-grained deps cache file for a module contains all the
fine-grained dependencies *from* the module (that is, those whose
targets are in the module). This has the advantage that producing fine-grained
dependency cache files is nicely localized (just run it on a module), but
the downside that *loading* the fine-grained deps cache is a global operation,
requiring every cache file to be loaded.

To improve daemon performance, we invert this, and have the deps cache file
for a module contain the fine-grained dependencies *to* the module. This
complicates creating the cache files: we need to explicitly sort out triggers
into the appropriate cache file.

This, then, allows us to postpone loading deps cache files until the module
is updated.

Because protocol dependencies now get sorted out into modules like everything
else, this notionally eliminates the special protocol deps cache. In practice, the
protocol deps cache has morphed in a cache for 'root' dependencies that weren't
placed somewhere else (because neither it nor a parent module is in the build) and 
the meta file for it has grown additional metadata to check consistency of the deps
cache. (Because deps files are now written after metadata, we can't store info about 
them in the metadata files.)
  • Loading branch information
msullivan authored Jan 31, 2019
1 parent 40f46c0 commit 4be41e4
Show file tree
Hide file tree
Showing 5 changed files with 287 additions and 158 deletions.
Loading

0 comments on commit 4be41e4

Please sign in to comment.