diff options
author | Steve McIntyre <steve@einval.com> | 2018-06-01 00:16:27 +0100 |
---|---|---|
committer | Steve McIntyre <steve@einval.com> | 2018-06-01 00:19:27 +0100 |
commit | e86a3b73808f23c9361274c6c4781a3b9f7950d3 (patch) | |
tree | 3e9770e57fe402a87882a0a6235aa83eeb8eac39 /Perl | |
parent | 17c73a0980186018b2380ddad96b01eab68b43fa (diff) |
Improve performance more with a cached repo
Once we've cached the whole repo, stop trying to add more files. It
takes a long time if we keep trying to lookup things that are not in
the cache.
Diffstat (limited to 'Perl')
-rw-r--r-- | Perl/Local/VCS_git.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Perl/Local/VCS_git.pm b/Perl/Local/VCS_git.pm index 51ed046fbd6..378ba9d66a5 100644 --- a/Perl/Local/VCS_git.pm +++ b/Perl/Local/VCS_git.pm @@ -143,6 +143,12 @@ sub cache_file { my $file = shift; _debug "cache_file($file)"; + + if ($self->{REPO_CACHED}) { + _debug "cache_file() returning early - whole repo already cached"; + return; + } + if ($self->{CACHE}{"$file"}) { _debug "$file is already cached..."; _debug "cache_file($file) returning early"; |