From 548c973e8282bbec5b14f3860218b23564dc0381 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Thu, 25 Jul 2024 18:05:42 +0200 Subject: libstore: remove Worker::updateProgress just update progress every time a goal has returned from work(). there seem to be no performance penalties, and the code is much simpler now. Change-Id: I288ee568b764ee61f40a498d986afda49987cb50 --- src/libstore/build/derivation-goal.cc | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/libstore/build/derivation-goal.cc') diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc index d0152355f..8899cebfb 100644 --- a/src/libstore/build/derivation-goal.cc +++ b/src/libstore/build/derivation-goal.cc @@ -79,7 +79,6 @@ DerivationGoal::DerivationGoal(const StorePath & drvPath, trace("created"); mcExpectedBuilds = std::make_unique>(worker.expectedBuilds); - worker.updateProgress(); } @@ -100,7 +99,6 @@ DerivationGoal::DerivationGoal(const StorePath & drvPath, const BasicDerivation trace("created"); mcExpectedBuilds = std::make_unique>(worker.expectedBuilds); - worker.updateProgress(); /* Prevent the .chroot directory from being garbage-collected. (See isActiveTempFile() in gc.cc.) */ @@ -670,7 +668,6 @@ void DerivationGoal::started() act = std::make_unique(*logger, lvlInfo, actBuild, msg, Logger::Fields{worker.store.printStorePath(drvPath), hook ? machineName : "", 1, 1}); mcRunningBuilds = std::make_unique>(worker.runningBuilds); - worker.updateProgress(); } void DerivationGoal::tryToBuild() @@ -1537,8 +1534,6 @@ void DerivationGoal::done( worker.failedBuilds++; } - worker.updateProgress(); - auto traceBuiltOutputsFile = getEnv("_NIX_TRACE_BUILT_OUTPUTS").value_or(""); if (traceBuiltOutputsFile != "") { std::fstream fs; -- cgit v1.2.3