From 5a21c020e7dd5b6316a707cb422b3d57fc61335e Mon Sep 17 00:00:00 2001 From: MelekTaus Date: Sat, 10 Oct 2026 19:46:18 +0200 Subject: [PATCH] Describe what waits for the end of a drag (#394) - Architecture: a drag's frame skips the hidden Scene view and the preloading of files, with the numbers measured. Co-Authored-By: Claude Opus 5.5 --- Architecture.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Architecture.md b/Architecture.md index a4e8ad9..fcee192 100644 --- a/Architecture.md +++ b/Architecture.md @@ -523,6 +523,14 @@ own pause and round trip are in every number). The Texture tab had been paying t last pointer move a few milliseconds later to update hover, with the same native event, and each one ran a full preview. +**What nobody sees waits for the end of the drag** (#394). While `FramePreview` announces its +frame, `isDragFrame()` is true. Two listeners of the `project` event skip that frame: the Scene +view behind another tab, which remembers it and draws on coming back (as it does while a game +runs, #265), and `preloadProjectFiles`, which walks every asset. The command that ends the drag +emits for itself, and a drag that changes nothing ends with a plain `state.preview()`, so both +catch up then. Measured on a copy of a project with 162 assets, a band of a Parametric EQ dragged +at 250 pointer moves a second: 17 ms of listeners per frame before, 7.4 ms after. + The inspector's rows and the gradient bar's colour stops go the same way (#274). `previewingHandlers` asks for the frame on every input, whether scrubbed, typed or picked, and cancels it before the command; the bar's `preview` handler in `shapeSection.ts` does the same. Both had been paying twice