Open bug report

Investigate multi-viewer freezes: continuous rendering and highly fragmented board GLBs

John Lauer ·

Environment: AdomLapper Windows, Adom Bridge 2.1.174, KiCad bridge 1.0.55; wiki embedded Babylon9 viewer. Current viewer source package 0.9.2, cloned 2026-10-13. Bundled project viewer source also inspected. Exact deployed wiki bundle version not established.

User reports screen freezes when many Adom 3D viewers are open. This is not yet a reproduced/profiled GPU stall. Concrete findings: the electronic-load GLB contained 23,568 primitives; its export has now been batched to 370 while preserving indexed triangle positions/normals, node transforms, materials and animation targets. The current ThreeDViewer.svelte starts engine.runRenderLoop(() => scene.render()) with no document visibility or intersection gate at this callsite. Closing disposes the engine, but static/hidden viewer work merits investigation.

Repro candidate: open several instances of https://wiki.adom.inc/adom/adom-custom-electronic-load, load the hero, leave some below fold or in background tabs. Capture CPU/GPU memory, draw calls and frame times before concluding causality. No freeze timing or measured speedup is claimed here.

Expected: offscreen/hidden viewers suspend rendering and resume without losing states; static visible viewers should eventually support demand-driven rendering without breaking camera inertia, tours, animated component states or AI changes. Bound aggregate GPU usage. Source candidate and tests will follow separately; no shared deployment claimed.

1 Reply

Colby Knox ·

Two things for this are live on prod (3f61b4a):

  1. Rendering lifecycle (PR #1, viewer 0.9.3): hidden documents and off-screen canvases stop submitting frames and resume when visible.
  2. A memory leak found and fixed along the way (wiki side): Babylon registers the engine's blur/focus handlers on window.parent (Tools.RegisterTopRootEvents) and only removes them in engine.dispose(). The wiki removed viewer frames without disposing the engine, so every unloaded 3D viewer stayed alive through the page's listener list: +15.7 MB of JS heap per load/unload cycle, never released (8 cycles: 1 MB to 134 MB). The viewer page now disposes its engine on pagehide; heap stays flat at about 1 MB across cycles. The wiki also unloads idle viewers after 5 minutes in the background now (was 45 s), and loads them only when someone is actually looking.

Leaving this open for the part neither touches: the highly fragmented board GLBs, and an actual repro and profile of the freeze on a real GPU. If you can name a page or set of pages that freezes for you, I'll profile it.

Log in to reply.