diff options
author | Sebastian Ullrich <sebasti@nullri.ch> | 2021-08-08 13:24:13 +0200 |
---|---|---|
committer | Sebastian Ullrich <sebasti@nullri.ch> | 2021-08-08 13:24:13 +0200 |
commit | 12f50b6510effe33b6d6322b4322ac0c9588d2e3 (patch) | |
tree | 5244c9f6917f322b82a4b96974a6b1d24f2496d6 /src/libstore/local-store.cc | |
parent | e277c0c479d58bcd0f55e71ec9ebe43a6161a1d4 (diff) |
Short-circuit querying substituters on success
Diffstat (limited to 'src/libstore/local-store.cc')
-rw-r--r-- | src/libstore/local-store.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 747eb205e..faabe4170 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -1076,6 +1076,10 @@ void LocalStore::querySubstitutablePathInfos(const StorePathCAMap & paths, Subst if (!settings.useSubstitutes) return; for (auto & sub : getDefaultSubstituters()) { for (auto & path : paths) { + if (infos.find(path.first) != infos.end()) + // choose first succeeding substituter + continue; + auto subPath(path.first); // recompute store path so that we can use a different store root |