aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-08-30 19:01:30 +0200
committereldritch horrors <pennae@lix.systems>2024-08-30 19:01:30 +0200
commitdc0cace604d71d274654525e90d0afed9aa36dc9 (patch)
tree27cbc96ea0a9d1a7fe662466ed5289228436937f /src/libstore
parente0fd0ba211b38827627218424f92b7d0e059a626 (diff)
libstore: remove queryMissing call from Worker
it doesn't have a purpose except cache priming, which is largely irrelevant by default (since another code path already runs this exact query). our store implementations do not benefit that much from this either, and the more bursty load may indeed harm them. Change-Id: I1cc12f8c21cede42524317736d5987f1e43fc9c9
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/build/worker.cc18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/libstore/build/worker.cc b/src/libstore/build/worker.cc
index 24c700396..0642754e8 100644
--- a/src/libstore/build/worker.cc
+++ b/src/libstore/build/worker.cc
@@ -344,7 +344,6 @@ void Worker::updateStatistics()
Goals Worker::run(std::function<Goals (GoalFactory &)> req)
{
auto _topGoals = req(goalFactory());
- std::vector<nix::DerivedPath> topPaths;
assert(!running);
running = true;
@@ -352,22 +351,7 @@ Goals Worker::run(std::function<Goals (GoalFactory &)> req)
updateStatistics();
- for (auto & i : _topGoals) {
- topGoals.insert(i);
- if (auto goal = dynamic_cast<DerivationGoal *>(i.get())) {
- topPaths.push_back(DerivedPath::Built {
- .drvPath = makeConstantStorePathRef(goal->drvPath),
- .outputs = goal->wantedOutputs,
- });
- } else if (auto goal = dynamic_cast<PathSubstitutionGoal *>(i.get())) {
- topPaths.push_back(DerivedPath::Opaque{goal->storePath});
- }
- }
-
- /* Call queryMissing() to efficiently query substitutes. */
- StorePathSet willBuild, willSubstitute, unknown;
- uint64_t downloadSize, narSize;
- store.queryMissing(topPaths, willBuild, willSubstitute, unknown, downloadSize, narSize);
+ topGoals = _topGoals;
debug("entered goal loop");