Skip to content

Stop door spawning stalling geometry loads on slow frames - #25

Merged
sir306 merged 2 commits into
mainfrom
dev
Oct 22, 2026
Merged

sir306 merged 2 commits into
mainfrom
dev

Conversation

@sir306

@sir306 sir306 commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Promotes one commit from dev to main: a4cb44d9.

Problem

A tester left Mobius idle for about 30 minutes, then loaded a geometry file, and the load crawled.

  • Mobius picks batched door/flow-counter spawning when FPS is at or below 40 (or the average is under 30, or memory is low).
  • The batched path then skipped every frame slower than 25 ms, i.e. under 40 FPS.
  • So on a slow or thermally throttled machine the door queue never drained, and the loading card stayed up.
  • Reproduced on ISO-Test-8-FireSmoke.udatasmith at t.MaxFPS 30: 0 of 15 doors spawned in 84 s, with 2,498 "skipped spawning" log lines.

Changes

  • Flow counters: batches are paced by wall-clock time only. Each 0.25 s batch spawns at least one door and stops early after a 4 ms budget (BatchTimeBudgetMs). Same test: 15 of 15 in 3.8 s.
  • Low-FPS watchdog: uses smoothed FPS, fires once per low-FPS spell instead of every 10 s, and ignores minimised frames.
  • Minimised cap (packaged / -game only): Mobius.Perf.MinimisedMaxFPS (default 5, 0 = off) caps the frame rate while the window is minimised and restores the previous t.MaxFPS afterwards. The editor and PIE are never capped; an unfocused window still runs at full rate.

Testing

  • Editor target builds clean.
  • In -game: t.MaxFPS reads 5 while minimised and 120 after restore, with no watchdog noise on restore.
  • Idle run with no data, 1 min vs 6 min: MaterialInstanceDynamic 180 → 96, TextureRenderTarget2D 2 → 2, UserWidget 135 → 135. No growth.

Not covered: the watchdog does not pause during loads, because ULoadingSubsystem keeps no loading state.

AI-assisted with Claude Code; all changes reviewed, tested, and verified by a human maintainer in line with this repository's AI-tooling policy.

🤖 Generated with Claude Code

sir306 and others added 2 commits October 22, 2026 15:47
A tester left Mobius idle for ~30 minutes, then loaded a geometry file and it
"crawled". DecideAndExecuteSpawnStrategy chooses batched flow-counter spawning
when FPS is at or below 40 (or the average is under 30, or memory is low), and
the batched tick then skipped every frame longer than 25 ms, i.e. under
40 FPS. On a slow or thermally throttled machine the door queue never drained
and the loading card stayed up, while one log line was written per skipped
frame. Reproduced on ISO-Test-8-FireSmoke.udatasmith at t.MaxFPS 30: 0 of 15
doors in 84 s and 2,498 skip lines.

- Flow counters: pace batches by wall-clock time only. Each SpawnInterval batch
  spawns at least one door and stops early after BatchTimeBudgetMs (4 ms), so
  the queue drains at any frame rate. Same test: 15 of 15 in 3.8 s.
- Low-FPS watchdog: judge on the smoothed FPS rather than one frame, fire once
  per low-FPS spell instead of re-arming every 10 s, and ignore minimised
  frames (in the check and in the average).
- Minimised windows (packaged / -game only): cap at Mobius.Perf.MinimisedMaxFPS
  (default 5, 0 = off) and restore the previous t.MaxFPS on restore. The
  editor and PIE are never capped; full rate while merely unfocused is kept.

Verified in -game: t.MaxFPS 5 while minimised, 120 after restore, no watchdog
noise on restore. An idle run with no data showed no growth between 1 and 6
minutes (MaterialInstanceDynamic 180 -> 96, TextureRenderTarget2D 2 -> 2,
UserWidget 135 -> 135). Editor target builds clean.

AI-assisted with Claude Code; all changes reviewed, tested, and verified by a human maintainer in line with this repository's AI-tooling policy.
@sir306
sir306 merged commit 4417d63 into main Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant