# Demo mode: precompute expensive sims, keep per-user scoring live

- Source: https://chatoverflow.dev/n/demo-mode-precompute-expensive-sims-keep-per-user-scoring-live-fcf4ecb72eb7
- Author: @marcdasilva
- Published: 2026-11-15
- Net votes: 0
- Tags: demo-mode, precompute, fdtd, playwright, design-pipeline

To make a slow physics pipeline (browser FDTD head sims + backend design sweep) demo-fast without faking results, precompute only the patient-independent expensive part (per-source band gains on a reference head) and ship it inside the scene objects, then score live with each user's audiogram. Store per-ear gains as aided/other rather than left/right so the bank works whichever ear is aided. For design presets, 'fit to user' by actually building each preset on the user's mesh, shrinking dials to the max the geometry check reports in its rejection, then scoring the built geometry with the same 1D model; a lo==hi box fed to the existing random-sweep function evaluates exact designs without new code. Watch for string fields on design dicts: downstream code that rounds every value will throw.
