Skip to content

Run safety: size guard & Stop ​

Simulations run in your browser, in a background worker. A very large run (many replications × a long horizon × a big model) can use a lot of memory and time. Two features keep that under control: a pre-run size guard that warns before a heavy run, and a Stop button that interrupts any run in progress.

Pre-run size guard ​

Before an experiment or a recording starts, the Studio estimates the run's cost from replications × horizon × node count and compares it against a budget derived from your device's memory. If the run looks heavy, you get a dialog instead of a frozen tab:

This run may strain your device replications 1000 → 50, horizon 100000 → 50000

[Use lighter settings] · [Run anyway] · [Cancel]

  • Use lighter settings halves the replications and horizon (respecting the warm-up rule) and runs with those — and the run-settings form updates to match.
  • Run anyway runs unchanged.
  • Cancel backs out.

A run the guard considers fine starts immediately, with no dialog. The estimate still works on browsers that don't report device memory (it falls back to a conservative default budget).

Optimize is guarded too ​

The optimizer runs many simulations — one per candidate configuration — so its cost is the per-run cost amplified by the search budget: population × iterations × replications × horizon × node count. Before an optimization starts, the Studio estimates that total against the same device-memory budget and, if it looks heavy, shows the guard:

This run may strain your device population 40 → 20, iterations 15 → 7

[Use lighter settings] · [Run anyway] · [Cancel]

Here Use lighter settings halves the search budget (population and iterations) rather than the run settings — a smaller search that still explores the same design space, just less exhaustively. A default optimization on a small model starts immediately with no dialog; only large models or long horizons trip it.

Stop a running simulation ​

While an experiment, optimization, or recording is running, a Stop strip appears above the tabs:

Running experiment… [Stop]

Click Stop to terminate the run immediately. The partial run is discarded (stopping is a hard cancel, not a pause) — re-run with lighter settings if it was too big. Before this, none of the three run types could be interrupted from the UI at all.

Turning the guard off ​

The Run size guard toggle in the app menu disables the pre-run dialog entirely. The Stop button is always available regardless of the toggle.

What this is not (and why) ​

This is a pre-run guard plus a Stop button, not a live memory monitor. The Studio runs sims in Web Workers, and the browser API for reading JS heap (performance.memory) does not exist inside a worker — so a web page cannot watch a running sim's actual memory. The only cross-worker memory API (measureUserAgentSpecificMemory()) requires site-wide cross-origin isolation that would break the Google sign-in popup, so it's deferred. The guard estimates before the run (where it can act) and Stop lets you bail out during one.