Files
magpie/internal
yetone 9d78a95ef8 routing: a flight's arc is laid again only when its ends move, and account names are read from answers without Object.entries (#1481)
Two smaller sources of the Routing page's steady garbage were left once
the rows were kept. Both were measured with CDP sampled allocation at one
request a second:

- via's j laid the arc through magpie on every frame of a flight: a new
  path string and its control points sixty times a second, though its
  ends had not moved. It now keeps the ends it laid and returns when they
  are the same. That path was 10-13 MB/min and is now ~5.
- noteAccounts walks every API answer (Routing's trace once a second) to
  learn account names for Hide accounts. Object.entries made an array for
  each object and one for each key, ~7-8 MB/min on Routing. It now walks
  with for...in and Object.hasOwn, so the same keys are visited.

Routing ~100 -> ~86 MB/min (from ~149 before the previous commit).
As with the previous commit, the WebKit WebContent footprint did not
change in a 12-minute A/B (119 -> 260 MB before, 117 -> 257 MB after).

Test: routing-steady-garbage.test.cjs, in chromium and webkit, en and zh.
It counts the arc's d writes against the frames drawn while a request
flies, and counts Object.entries calls while noteAccounts reads 50 routes.
It also checks that all 50 accounts are still found. On HEAD's client.js
the arc was laid 32 of 41 frames, and on HEAD's app.js Object.entries ran
201 times: both red.

Run: the 117 GUI files these changes reach (routing-*, panel-routing*, and
every file that drives the Routing page or noteAccounts), chromium and
webkit, their languages and widths, at concurrency 4 on a machine at load
average 500-860 from other sessions: 1520 tests, 1402 pass, 118 fail. Of
the 118, 74 are page.goto timeouts and most of the rest locator timeouts.
The 37 red files were run again at concurrency 2: 726 tests, 45 fail.
The four files red each time were run with HEAD's app.js and client.js
(these changes taken out) and are red there the same way:
group-new-head (4 of 4), routing-bodies (10 of 10), routing-keys-fold
(8) and routing-model-rest (load-dependent, 4 to 12). On origin/main
d9c6a60d8's GUI tree routing-bodies and routing-keys-fold are red too;
group-new-head passes there and goes red with 4b000ecc2 (its rowClock
throws "Invalid time value" on a route with no time), which is on this
branch and not part of this change.
routing-request-metrics fails waiting for the metric menu's Cost item
on this tree (3 of 4 alone), on HEAD (4 of 4) and on origin/main (2 of
4). The other reds were page.goto or locator timeouts under this load.
The two new files passed 4 of 4 each in the full run. No Go changed.

Not tried: real WebView2 on Windows, and the real macOS app.
2026-10-20 20:23:58 +08:00
..
…
…
…
…
…