From c2b90d235fb5dd721898d8d41d73a51607654890 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Fri, 30 Aug 2024 19:01:30 +0200 Subject: libstore: don't ContinueImmediately where we can tail call there's no reason to go through the event loop in these cases. returning ContinueImmediately here is just a very convoluted way of jumping to the state we've just set after unwinding one frame of the stack, which never matters in the cases changed here because there are no live RAII guards. Change-Id: I7c00948c22e3caf35e934c1a14ffd2d40efc5547 --- src/libstore/build/derivation-goal.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 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 a75a674d1..1dda1b1b4 100644 --- a/src/libstore/build/derivation-goal.cc +++ b/src/libstore/build/derivation-goal.cc @@ -649,7 +649,7 @@ Goal::WorkResult DerivationGoal::inputsRealised(bool inBuildSlot) slot to become available, since we don't need one if there is a build hook. */ state = &DerivationGoal::tryToBuild; - return ContinueImmediately{}; + return tryToBuild(inBuildSlot); } void DerivationGoal::started() @@ -772,7 +772,7 @@ Goal::WorkResult DerivationGoal::tryToBuild(bool inBuildSlot) actLock.reset(); state = &DerivationGoal::tryLocalBuild; - return ContinueImmediately{}; + return tryLocalBuild(inBuildSlot); } Goal::WorkResult DerivationGoal::tryLocalBuild(bool inBuildSlot) { -- cgit v1.2.3