Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

SF_GOVERNOR=0 pins the profile's budgets for benchmark A/Bs; doc: the governor confound

islandmedeb2f2aac0345
diff --git a/docs/design/perf-moonshots.md b/docs/design/perf-moonshots.md
index cf3fd662..24578f5a 100644
--- a/docs/design/perf-moonshots.md
+++ b/docs/design/perf-moonshots.md
@@ -45,7 +45,10 @@ when it stops (`SF_MOTION_RESOLUTION=25..100` sets it on any profile).
events, sculpt, UI, upload = ghost + scene sync, draw = GL calls, swap_wait = UI draw + swap, where the frame
waits for the GPU). It decides whether a native backend (D3D11/12, Metal) behind a thin render interface should
move earlier: only if draw + swap_wait dominate on the floor profile at 20M while sculpt and upload are within
-budget. Run: `--benchmark --benchmark-sizes 5,20,50`, with and without `SF_HW_SIMULATE=floor`.
+budget. Run: `--benchmark --benchmark-sizes 5,20,50`, with and without `SF_HW_SIMULATE=floor`. For A/Bs add
+`SF_GOVERNOR=0`: otherwise the frame governor may lower the budget in some runs and not others (core-200m saw
+0.3M vs 1.44M triangles drawn for the same setting), which swamps the effect being measured. The motion-resolution
+A/B below ran with the governor on, so treat it as indicative.
**First measurement** (11-03, M1 Pro, one run each at load < 2 at start; p99 frame / stroke latency p50):
diff --git a/src/app/PanelPerformanceProfile.cpp b/src/app/PanelPerformanceProfile.cpp
index 278b8bc8..489f7b54 100644
--- a/src/app/PanelPerformanceProfile.cpp
+++ b/src/app/PanelPerformanceProfile.cpp
@@ -270,7 +270,11 @@ void App::hardwareProfileFrameEnd() {
} else {
changed = hw.governor.addFrame(sample);
}
- if (changed && hw.profile.overrides.governor && !hw.profile.overrides.motionProxyThreshold)
+ static const bool pinned = [] { // SF_GOVERNOR=0: the budgets stay as the profile set them (benchmark A/Bs)
+ const char* v = std::getenv("SF_GOVERNOR");
+ return v && *v == '0';
+ }();
+ if (changed && !pinned && hw.profile.overrides.governor && !hw.profile.overrides.motionProxyThreshold)
setGovernedBudgets(hw.governor.budget(), hw.governor.proxyThreshold());
// The display (the window moved to a 120 Hz screen) or the power source (unplugged) may change: every few
// seconds, look; a change re-applies the profile with the new tier configuration.