Skip to content

perf: shared-vertex projection, run-wise colour validation and a bounded stroke walk - #46

Merged
apresmoi merged 3 commits into
mainfrom
perf/indexed-projection
Sep 11, 2026
Merged

apresmoi merged 3 commits into
mainfrom
perf/indexed-projection

Conversation

@apresmoi

@apresmoi apresmoi commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Three render-path optimisations. Every cell byte-identical, checked against all three fidelity digests.

Bounded stroke walkapplyCellHook 6.19 → 3.35 ms, base-raster −16.8%. The stamper walked 1.1M cells per render, 99.5% of them off-grid: a road that leaves and re-enters the viewport is one segment thousands of cells long. It now iterates only the reachable range. Same samples, same output.

Colour validated once per run, not per cell — spans −45%, atlas −60%. Grids average 17 cells per colour run and the regex ran on every one.

Shared vertices projected once — 259,200 vertex occurrences over 65,341 unique positions on a real terrain tile. Orbit at 283×105 −4%, terrain-only walk −11.3%. Roughly nothing for buildings, whose walls share only vertical edges.

Also: bench/maps-render --walk-look defaulted to 0.15°/frame, which renders synchronously and inflated every walk number that harness produced. Now 0; affected figures re-derived.

Two defects found, reported in docs/design/performance.md, not fixed here — neither is byte-identical:

  • The id-map raster is the only polygon loop without the cull runs or the hidden skip, so it claims cells for hidden polygons and blanks layers that paint there.
  • OSM row density above 1 is a cliff, 55 → 9.5 fps: all thirteen rows separate into their own passes and the scene is rastered again per render.

@apresmoi
apresmoi merged commit b7f60e4 into main Sep 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant