Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion FIDELITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The 500-page run relaunched at the end of round 167 (both crash fixes in place)
- **Fixed**: `LoadFontFaces`'s per-slot loop now fires every DISTINCT candidate concurrently (deduped by a new `srcsKey` β€” the same src list parsed twice, e.g. the same stylesheet named twice, still fetches once) and picks the lowest-declaration-order success after they all finish, instead of walking the list waiting for each failure in turn. `e.Client`'s existing per-host semaphore (`maxPerHostConcurrency`, round 57/58, left at 2 β€” the round-152/153-measured value, re-confirmed still right for Wikimedia, not re-opened by this round) still bounds real network concurrency, so this is a bounded, not unlimited, speedup: candidates now batch through that cap rather than waiting out every predecessor's own fetch one at a time.
- **Test**: `TestLoadFontFacesTriesSlotCandidatesConcurrentlyNotSequentially` β€” a local server with 5 slow-then-500 candidates plus 1 fast-success candidate declared LAST in one slot, deliberately shaped like the live cs.cmu.edu case. Stash-verified: ~460ms with the fix (bounded by the per-host cap, confirmed deterministic across 3 runs) vs ~760ms on the unfixed code (sequential), a measured, reproducible, and reliably-separated difference, not assumed from the live site alone (which could not be cleanly re-measured after this round's own repeated testing had, by its own escalating response times, visibly triggered the origin's own rate-limiting/anti-scraping defenses β€” an honest limitation of live-site verification for this specific fix, mitigated by the deterministic local-server test instead).
- **Coverage**: `fontfaces.go`'s `LoadFontFaces` and the new `srcsKey` both land at 100%; the top-level `engine` package moves from a pre-existing 96.1% baseline (confirmed via `git stash`, unrelated gaps) to 96.2% β€” no regression.
- **Not fixed this round, flagged honestly**: `unicode-range` itself remains unmodelled (this fix removes the serialization cost of the collision, not the collision β€” all five rules still compete for one slot, and whichever succeeds first wins for the WHOLE family+weight regardless of which glyphs it actually covers; a page relying on Font Awesome's REAL icon-subset behavior could still render the wrong glyphs, just not slowly). `cs.cmu.edu` itself could not be cleanly re-measured after this fix landed β€” the live-site contamination described above persisted (still ~45s on a careful single re-check well after the fix merged), consistent with the origin's own throttling outlasting this session rather than the fix being ineffective (the deterministic local test is the real evidence it works). Checked ONE other slow page from the same bench run, `foundation.zurb.com` (24.8s in the run, not yet touched by any of this round's live testing, so uncontaminated): still ~40s after the fix, and β€” checked directly rather than assumed β€” `DisableJS=true` dropped it to ~6.2s on the SAME page, meaning its slowness is JS-settle-related, NOT the font-face bug this round fixed. **Correcting the round's own earlier guess**: `cs.cmu.edu`'s shape is not a shared cause across the other ~9 slow pages; at least `foundation.zurb.com` has a distinct, unrelated, JS-driven cause, still open for a future round.
- **Not fixed this round, flagged honestly**: `unicode-range` itself remains unmodelled (this fix removes the serialization cost of the collision, not the collision β€” all five rules still compete for one slot, and whichever succeeds first wins for the WHOLE family+weight regardless of which glyphs it actually covers; a page relying on Font Awesome's REAL icon-subset behavior could still render the wrong glyphs, just not slowly). `cs.cmu.edu` itself could not be cleanly re-measured after this fix landed β€” the live-site contamination described above persisted (still ~45s on a careful single re-check well after the fix merged), consistent with the origin's own throttling outlasting this session rather than the fix being ineffective (the deterministic local test is the real evidence it works). Checked ONE other slow page from the same bench run, `foundation.zurb.com` (24.8s in the run, not yet touched by any of this round's live testing, so uncontaminated): still ~40s after the fix, and β€” checked directly rather than assumed β€” `DisableJS=true` dropped it to ~6.2s on the SAME page. **Correcting the round's own earlier guess**: `cs.cmu.edu`'s shape is not a shared cause across the other ~9 slow pages. `foundation.zurb.com`'s own cause (round 169's follow-up CPU profiling pinned it precisely: SVG rasterisation of content the JS-settled DOM reveals that a no-JS render never has to pay for β€” see this file's "Known gaps" section) is distinct from both the font-face bug this round fixed AND from JS execution being slow in CPU terms.

## 2026-10-09 (round 167) β€” the interrupted 500-page bench run (round 166's own queued work) found a second real crash: a lone CSS Grid item using `grid-row:1 / -1` with no explicit row template panicked on an empty row-offset slice (engine#266, patch)

Expand Down Expand Up @@ -5657,6 +5657,7 @@ Restated against what was actually verified that day:
fetch or decode still falls back to the bundled three, unchanged.
- **`sticky` β‰ˆ `relative`, approximate z-index stacking** β€” the deliberate
simplifications from Phase 1.8, unchanged.
- **SVG rasterisation cost scales with output pixel area and is unbounded β€” a large, gradient-filled vector (a decorative background pattern, a hero illustration) can dominate a whole page's render time, confirmed independently on TWO pages.** First found investigating `docs.docker.com/reference/compose-file/interpolation/`'s own slow render: a decorative background SVG (`dot-pattern.svg`, ~2657 tiny `<path>` elements, 1158Γ—598 intrinsic size) cost 5.7s to rasterise at its full on-page output size, 1.3s at half, 0.3s at quarter β€” a roughly quadratic (area-scaling) cost, as expected for a per-pixel rasteriser, with no ceiling on how large that area can be. Round 168/169's own bench-corpus profiling independently confirmed the SAME cost category on a completely different page, `foundation.zurb.com` (get.foundation): CPU profiling showed 84% of its ~30s render time inside `rasterx.ScannerGV.Draw` β†’ `golang.org/x/image/vector.Rasterizer`, dominated by `rasterx.ColorFuncImage.At` (per-pixel gradient-color sampling) β€” not font-loading (round 168's own fix, confirmed not applicable here) and not JS-execution CPU cost itself (`DisableJS=true` drops this SAME page to ~6.2s, but because the JS-settled DOM then has LESS rasterisable SVG content, not because JS execution is slow in CPU terms β€” a no-JS render is simply missing the content the real page actually ends up with). Not fixed: capping SVG output resolution or budgeting rasterisation time per SVG are the two live options, and BOTH change rendering output (a capped/time-boxed SVG renders at lower fidelity or not at all) rather than only internal performance β€” a deliberate decision this session has twice deferred rather than pick unilaterally, now with two independent real-world triggers rather than one.

## Reproduce

Expand Down
Loading