Repository navigation
trailview: the stamp worker keeps less for each feature tile - #3802
Open
timohueser wants to merge 2 commits into
Open
timohueser wants to merge 2 commits into
timohueser wants to merge 2 commits into
Conversation
The cells of a tile's index grow with the tile, to at most 16 × 16 across it; a zoom 13 tile keeps its cells. At a level where no line shows (12 and coarser), a node writes no junction or corner records, and its tile keeps only the lines of the water mesh. In a replay of the walk in WebKit's engine, the stamp worker's peak falls from 209 to 48 MiB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 51 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
The tests pin the boundary: no line shows at level 12 and coarser, a motorway shows at level 13, and a zoom 12 tile keeps its roads. The kinds that a coarse tile keeps say which reader needs each one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
timohueser
marked this pull request as ready for review
November 22, 2026 00:59
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mode: change #3793
Requirements: none
Public docs: no
Closes #3793. Part of #3656.
What changed
All in
terrain/bins.ts, underbuilder/web/src/lib/trailview/:Shapescarries the tile's zoom. The grids of a tile's index (tileIndex,deckIndex) have cells of the larger of 2^13 world units and the tile's size / 16. A zoom 13 tile keeps its cells. A zoom 8 tile has 16 × 16 cells in place of 512 × 512, so the box of a long river no longer fills thousands of cells.linesShow(level): whether any line can show at a level, from the reach limit ofshows, whichshowsnow shares. It is false at level 12 and coarser.nodeStamps: a node at a level where no line shows writes no junction and no corner records. The shader draws nothing from them there: it skips a corner whose road does not show, and a junction's reach is below 0.features: a tile under zoom 13 whose nodes show no line (zoom 11 and coarser) keeps only itsRIVER,STREAM,BRIDGEandTUNNELlines: the water mesh draws the rivers and streams and lifts them under a bridge, andportalBoxesreads the tunnels.Tests: the
linesNeartest runs on a zoom 13 and a zoom 8 tile. A new test holds thatshowsis false for every profile whereverlinesShowis false, that this is level 12 and coarser, and that a motorway shows at level 13. A new test holds that a zoom 10 fixture tile keeps only those four kinds and a zoom 12 tile keeps its roads, and that a level 12 node writes no junction or corner record while the level 14 nodes of the same tile do.kind.test.tsandcores.test.tsgive their hand-madeShapesa zoom.Checks
In
builder/web:npx vitest run src/lib/trailview: 71 files, 501 tests pass.npm run check: 0 errors, 0 warnings.cairn check: no new violations.obc prose --check: pass.Replay (M1 Pro, the method of the comment on #3793): the recorded messages of the walk (243 jobs) and the valley drive to and fro twice (1,011 jobs), at
tier=phone, fed one at a time to the built stamp worker in the JavaScriptCore shell of macOS.Far views (headless Chromium on Metal, 390 × 844 CSS pixels at DPR 2, the release data of Central Switzerland): the start of the four kit scenes and the two far views of the epic's galleries, develop and this change, at both tiers. The renderer is not exact from run to run, so develop also ran twice. Pixels that differ in any channel, and by more than 8/255:
Two runs of the same build move up to 3,788 pixels, each by at most 8/255 (the change against itself on far-south, phone: 860). The change moves pixels within that range and by no more than 8/255, so no gallery is needed. The bridge-tunnel view moves about 800 pixels by more than 8/255 in every pair, develop against develop too.
Review
One review round (opus, high). Fixed: no test pinned the boundary between zoom 11 and zoom 12, where a wrong filter would remove the roads that level 13 draws; and the constant of the kept kinds named the water mesh as the reader of the tunnels. Checked and sound:
featureTilemaps each coarse tile to one level; the dropped junction records only set the shelf share, which only road segments read; the water ribbons keep their order; floors, structure meshes and road meshes read zoom 13 only;audit.wgslalready skipped the coarse road samples.Phone (owner)
The phone check runs on the iPhone 13 with the app host of
prototype/trailview-ios-app, attier=phone:p-end-stamp: the stamp worker gives back at most 112 MiB (it gave back 192 MiB in TrailView phone tier: smaller caches and fewer workers #3778).p-soak: the 10-minute drive ends with at least 512 MiB of headroom (416 MiB in TrailView phone tier: smaller caches and fewer workers #3778).RESULTS PENDING
🤖 Generated with Claude Code