Web perf: gate feeds on visibility + split vendor chunks#20
Merged
Conversation
- Each weather feed now takes an `enabled` flag tied to its layer's visibility, so a hidden layer costs no fetch or polling. The big win: the 1.8 MB lattice.json no longer loads on every visit — only when temperature (off by default) is switched on. Alerts and the citytile axis still always load (the axis drives the shared timeline). Polling lazy-starts on first enable. - Split the GPU/map vendors (deck.gl/luma/deck-wind-layer, maplibre/react-map-gl) into their own chunks: the app chunk drops from ~1.1 MB to ~286 KB, vendors cache across deploys and download in parallel. (The wind double-decode the audit also flagged is deferred — sharing one texture between the fill raster and the particle layer needs deck-wind-layer to accept a preloaded texture; tracked separately.)
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.
From the audit (perf lane).
enabledflag tied to its layer. The headline win:lattice.json(1.8 MB) no longer loads on every visit — only when temperature (off by default) is enabled. Hidden layers cost no fetch/poll; alerts + the citytile axis always load (the axis drives the timeline). Verified: enabling temperature lazy-loads the lattice and it renders.Deferred (noted in commit): the wind fill+particle double-decode needs
deck-wind-layerto accept a preloaded texture.tsc, biome, build all pass; chunk split confirmed in the build output.
Docs & attribution