Skip to content
Version 2.11.0
↓ Get the launcher

PerfControls class

Runtime bisect toggles for the overlay perf harness, mutated from the perf overlay and read by UiBuilderService.Tick and ThemeRenderer. Only meaningful while IsEnabled — callers still read these unconditionally, but the overlay that flips them only exists when the harness is enabled, so production state stays at the inert defaults.

public static class PerfControls
name description
static ChromeKill { get; set; } Skip ThemeRenderer.DrawWindowChrome (isolate chrome cost).
static ForceOpaque { get; set; } Render large framework background fills opaque (isolate blend/overdraw).
static MasterHudKill { get; set; } Skip drawing every registered window (run with the menu closed to prove the draw is the cost and rule out menu-induced game changes).
static MutedIds { get; } Snapshot of currently-muted window ids (overlay display).
static ThrottleN { get; set; } Draw window content only every Nth frame. 1 = every frame (off).
static Uncap { get; set; } Set vSyncCount=0 + a very high targetFrameRate so the frame rate is CPU/GPU-bound rather than pinned to the display refresh — makes a per-frame CPU saving visible as an FPS delta instead of vsync-masked. Mutable so the Settings → Performance “Uncap Frame Rate” toggle re-applies vSync live (the host tick reconciles QualitySettings.vSyncCount to this value).
static UpdateRateHz { get; set; } Framework tick rate in Hz — how many times per second Stellar runs its whole per-frame work (services, HUD animation, plugin Updates, window interaction, input). The tick is driven by an InvokeRepeating schedule at this rate instead of every render frame, so most frames have ZERO managed-runtime entry — that entry is the ~12-18 fps “managed crossing” tax measured on this BepInEx 6 IL2CPP stack (a frame with no managed entry costs nothing; cost is linear in entries/sec). Lower = more game FPS (near-vanilla at 30); higher = smoother/lower-latency Stellar UI but more FPS cost. Mutable so the Settings → Performance slider re-rates the live ticker. Default 30 (near-vanilla FPS, ~33 ms UI latency). MaxUpdateRateHz means “every frame” (Unity caps the schedule to the frame rate).
const DefaultUpdateRateHz Default tick rate (near-vanilla FPS while keeping the HUD/input smooth).
const MaxUpdateRateHz Slider ceiling — treated as “every frame” (the per-frame, max-cost mode).
const MinUpdateRateHz Slider floor — below this the HUD/input feel unusably laggy.
static readonly RateFromOverride True when the rate came from an explicit env var / flags-file entry (a dev override), so the persisted user setting must NOT clobber it at boot.
static readonly UncapFromOverride True when UNCAP came from an explicit env var / flags-file entry (a dev/measurement override), so the persisted user setting must NOT clobber it at boot.
static ClampRate(…) Clamp an arbitrary rate into the supported [MinUpdateRateHz, MaxUpdateRateHz] range. Shared by the env resolver and the Settings persistence.
static Flag(…) Resolve a launch flag the same way as the perf flags: STELLAR_<NAME>=1 in the env, OR a line “NAME”/“NAME=1” in game_mini/stellar_perf.flags. Shared so other gates (e.g. StellarDiagnostics) read the deploy-script mode file without Heroic env edits.
static IsMuted(…) Returns true if the named window is currently muted (skipped) by the perf harness.
static IsThrottledOut(…) True when this frame should be SKIPPED under the throttle. Frame 0 and every Nth frame draw; the N-1 frames between are skipped. N<=1 disables.
static SetMuted(…) Add or remove windowId from the muted set; muted windows are skipped by MasterHudKill isolation tests.