Files
figcraft/crates
tylerjenningsw 79d436a469 perf(canvas): preview cold zoom and page transitions once they run long (M8)
Whether a zoom got a preview rested on the previous render from
scratch, so the first render, another page or file, and a zoom from a
quick view to a heavy one came without one: the page colour showed
until the full render was done.

Rendering every such preview up front would cost 8-56% of a full render
(bench pages of 1k-50k layers at 2880x1800; per-layer costs dominate
large pages). Instead the render thread arms a watchdog thread as it
starts a render from scratch without a preview; once that render has
run past 12 ms the watchdog renders the preview beside it, on one core
while the full render keeps the others, and sends it unless the full
image is done. Quick renders cost nothing and never flash a preview.
Warm slow zooms keep the preview first, which keeps up with a gesture.

With two threads sending, finished images carry their request's
number: a poll takes the newest request's, and of one request the
refined image; the canvas never shows a preview over the refined image
of its own or a newer request.

Refs #295
2026-10-20 16:38:14 -04:00
..
2026-10-20 06:09:17 +07:00
2026-10-17 17:19:51 +07:00
2026-10-20 03:20:30 +07:00