Open source CapCut alternative.
TypeScript
docs: local-first and drag-preview rules in the performance guide
David Lefff2358a04be
diff --git a/docs/guides/performance.md b/docs/guides/performance.mdindex 8a1672ee..048b3cdd 100644--- a/docs/guides/performance.md+++ b/docs/guides/performance.md@@ -11,6 +11,12 @@ with the size of the project. If you are tempted to loop over every clip on everor decode a file nobody is looking at, that work belongs behind the visible part ornowhere at all.+## Local first, upload behind++Files stay local first. The editor works from the local copy while uploads happen in+the background. On Mac, heavy jobs run on the machine. The network never gets between+an action and its result.+## The frame budgetThe browser draws a frame only between our tasks. At 60Hz a frame has about 10ms for our@@ -52,6 +58,12 @@ where it was.only what remains after the three above. Yield by time against the frame budget, andnever so finely that the switching costs more than the work.+## A preview is the thing itself++The drag preview uses the same renderer and caches as the clip itself. It updates+instantly, once per frame, without recalculating the layout. Moving it just transforms+the box—the preview stays in sync with the source.+## Rules1. **One animation frame per tick.** The frame loop books exactly one request per tick