From e86a3b73808f23c9361274c6c4781a3b9f7950d3 Mon Sep 17 00:00:00 2001 From: Steve McIntyre Date: Fri, 1 Jun 2018 00:16:27 +0100 Subject: 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. --- Perl/Local/VCS_git.pm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Perl') 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"; -- cgit v1.2.3