mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 17:56:50 -06:00
The web build has no render worker, so every frame of a pan, zoom or rotation of the view rendered the whole canvas on the browser's main thread before it was shown. In Chrome, each of the 20 steps of a Space-drag over a document of 50,000 paths took a frame of 533 to 900 ms. In the web build the canvas now waits while only the view changes on a document whose last render took more than 8 ms. It draws the last frame moved, scaled or turned with the view, as the desktop app does while its worker renders, and it renders once the view has been still for 0.2 s. The same Space-drag now keeps every frame within 17 ms and renders once, in 667 to 767 ms, after the view stops. After an edit, a preview or an option change the canvas renders at once. The desktop app renders as before, with or without its worker. Docs: docs/target-app-parity.md.