perf: skip the unused curled wall estimate to speed up slicing by up to 9% (#16113)

perf: skip estimating curled walls when nothing reads them

The curled extrusion estimate ran whenever a region had overhang speed on,
which is the default, but only the slowdown for curled perimeters reads the
curled lines it produces, and that slowdown is off by default. The step now
also requires a region with the slowdown on, and clears the curled lines
when it skips the estimate, so none are left from an earlier slice. 
Also fixes stale fan commands due to the stale curled lines on the reused layers.
This commit is contained in:
Kris Austin
2026-10-04 09:45:19 +01:00
committed by GitHub
parent 88346efceb
commit 90ac58d3cd
4 changed files with 69 additions and 9 deletions
-5
View File
@@ -4414,11 +4414,6 @@ struct PrecomputedLayer
};
} // namespace
template<typename BoolsOption> static bool any_enabled(const BoolsOption &option)
{
return std::any_of(option.values.begin(), option.values.end(), [](unsigned char enabled) { return enabled != 0; });
}
// Whether process_layer() prepares the overhang estimator for `layer`.
template<typename OverhangSpeed>
static bool prepares_overhang_estimator(const Layer &layer, bool overhang_fan, OverhangSpeed overhang_speed)