perf(ui): Atlas deep rungs draw one gridunit per 2x2 px block

DISPLAY_RATIO_DEEP 1.0 -> 2.0, so a viewport-fit request at District/
Quarter/Block/Chunk asks for ~4x fewer gridunits (1920x1080: ~2.07M
cells -> ~518K) and the server-side derive cost falls with it. Texel-
exactness is preserved — the ratio stays a whole number of screen px
per gridunit, so every source texel still lands on whole pixels; only
the block size changes. Non-integer ratios are not an option here:
they reintroduce exactly the sub-pixel blur D-255's texel-exactness
exists to prevent.

Judged live by Jeroen against the 1x1 build (pair session): the deep
rungs read as crisp larger pixels rather than blur, and the speedup is
substantial. Looks were the gate.

Both transport tests that pinned the old literal now assert the
RELATIONSHIP instead — deep rungs share the constant, viewport-fit
divides by it — plus a new guard that the ratio stays whole, so the
value remains tunable without editing tests that are not about it.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-26 17:11:44 +02:00
co-authored by Claude
parent b58b02c98a
commit ae03ea2de7
2 changed files with 35 additions and 7 deletions
@@ -57,7 +57,17 @@ const RUNG_SPACING_M: Dictionary = {
## client-side, viewport-dependent parameter, kept architecturally separate
## from gridunit spacing") — it never touches a cache key or a wire request,
## only how many screen px one already-fetched gridunit occupies.
const DISPLAY_RATIO_DEEP: float = 1.0
## PAIR SESSION 2026-07-26 EXPERIMENT (Jeroen): DISPLAY_RATIO_DEEP raised
## 1.0 -> 2.0. One gridunit now occupies a 2x2 screen-px block, so a
## viewport-fit request asks for ~4x FEWER gridunits (a 1920x1080 window:
## ~2.07M cells at 1x1 -> ~518K at 2x2) and the server-side derive cost falls
## with it — the whole point of the experiment. Texel-exact either way (an
## integer ratio, no fractional-pixel blur); the tradeoff is purely visual
## chunkiness. LOOKS ARE THE GATE: revert to 1.0 if Jeroen judges the deep
## rungs too coarse. Non-integer ratios are NOT an option here — they
## reintroduce exactly the fractional-pixel blur D-255's texel-exactness
## exists to prevent.
const DISPLAY_RATIO_DEEP: float = 2.0
const DISPLAY_RATIO_SHALLOW: float = 5.0
## Global/Region read at the shallow ratio (orbital-scale canvases — extent