mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-24 18:18:17 -06:00
Every viewer request spawns a job on the frame pool. A pool thread blocked inside a render (waiting on a parallel loop's join) runs other pool work meanwhile, rayon's injected jobs included: the spawn of the next request started a whole frame render on top of the waiting one. Dragging makes a new revision, and a new viewer frame, every UI frame, so renders nested without bound on every thread, each holding its buffers (a large image's full-resolution copies), until all memory was used. Holding the layer still makes no new revisions, which is why only moving it did this. A spawn now drains the queue, and one that lands inside a render on its thread returns at once; the render below takes the queued jobs when it is done. Each pool thread renders one frame at a time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QiAJeFttZp83Fh7YuzAR5f