diff options
author | Steve McIntyre <steve@einval.com> | 2018-06-05 23:55:25 +0100 |
---|---|---|
committer | Steve McIntyre <steve@einval.com> | 2018-06-05 23:55:25 +0100 |
commit | 3912e3865cbaf05265db06203b2148b8d2cb28f4 (patch) | |
tree | acc4d67f42048be12b52a392b9987d69c56892ae /vcs-test.pl | |
parent | fc69476ae0c61204a83b6a18f96f798684d8004d (diff) |
Add support for a simple on-disk cache of git revs
We can't rely on having a full cache in memory, so add support for
dumping the cache to disk, and retrieving results later. After calling
cache_repo(), call save_cache_to_database() to dump the cache. This
will dump a list of the git revs and commit dates for each file in the
repo to disk (one per file), so we can easily look things up later
without having to call git again.
Initially attempted to do this with a sqlite database, but it didn't
improve performance when doing a large parallel make - if anything, it
was slower than calling git all the time.
Rough timing comparisons on my 4-core laptop with an SSD, all doing:
$ make clean
$ time make -j8
in webwml/german/devel/debian-installer/News...
* without any cache: 85s
* with sqlite cache: 120s
* with this simple list cache: 13s
The cache *does* take quite a bit of space, currently around
300MB. But it's such a big win that I think it's worth it...
Diffstat (limited to 'vcs-test.pl')
0 files changed, 0 insertions, 0 deletions