Files
magpie/internal
yetone 77f860105c routing: a flowing wire is drawn in a layer of its own, so WebView2 doesn't redraw every wire each frame (#3164)
On Windows the Routing page with an 800-key group open ran at 31 fps.
A flowing wire (stroke-dashoffset animated) sat in the one svg of every
wire, 993x36215 px with 803 paths, and Chromium re-rasterized that whole
svg on the GPU each frame: CrGpuMain was busy 5s in 5s, 3.6s of it in
RasterDecoderImpl::DoRasterCHROMIUM. Hiding the wires svg gave 118 fps,
taking the dash animation off the wires 102 fps; WebKit (macOS) was
never slow here.

Now flowNear draws each flowing wire by a copy in .rt-flows, an svg over
the wires with will-change: transform, with the wire's d, --agent and
the dashes it worked out, and hides the wire itself (.flown: hidden,
no animation). The look is the same; the svg of every wire no longer
changes while a request flows. Reduced motion stops the copies too.

Real WebView2 (Edg/155, Windows 11, Radeon 8060S), the magpie window at
1281x1128 CSS px, dpr 1.1, a sandbox HOME with two providers of 499 and
299 keys in one group, both folds open, a request every 0.3s through a
fake upstream; v0.1.1587's release exe against this commit built with
GOOS=windows:
  steady 15s x3   31 fps, 89-94 frames >40ms  ->  114 fps, 4-9 >40ms
  scroll 12s      58 fps                       ->  88 fps
  fold+unfold 4s  41 fps                       ->  103 fps
The same injected by hand into the old page first: 38 -> 48 fps with
the copies in a plain svg, 94 fps with will-change, so the layer is
what does it.

Test: routing-answered-still checks that each flowing wire has a copy
with its d, animated, in a will-change layer, the wire itself hidden
and still, and that nothing is left once the request is done. Without
this change .rt-flows doesn't exist and it times out.

Run at this commit (rebased on origin/main 5a94eec3a, which touches
nothing under routing): routing-answered-still 20 of 20 alone in
chromium and webkit. Eleven routing GUI files at concurrency 3 against
the base 44a626bed under load ~74: 127 pass / 45 fail here, 123 / 49 on
the base; the reds are rule-editor files that fail the same on the base
(#3408). routing-keys-fold had 2 reds here under that load (its "3
resting" wait, not a wire) and is 32 of 32 alone 3 of 3. go test
./internal/gui ok; GOOS=linux and GOOS=windows go vet -tags nogui ok.
Not tried: WebKitGTK.
2026-10-26 19:31:27 +08:00
..
…
…
…
…