Skip to content

Web perf: gate feeds on visibility + split vendor chunks#20

Merged
johncarmack1984 merged 1 commit into
mainfrom
audit/perf
Jun 27, 2026
Merged

Web perf: gate feeds on visibility + split vendor chunks#20
johncarmack1984 merged 1 commit into
mainfrom
audit/perf

Conversation

@johncarmack1984

Copy link
Copy Markdown
Owner

From the audit (perf lane).

  • Gate feeds on visibility — every weather feed takes an enabled flag 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.
  • Vendor chunk-splitting — deck.gl/luma/deck-wind-layer and maplibre/react-map-gl split into their own chunks. App chunk ~1.1 MB → ~286 KB; vendors cache across deploys and load in parallel.

Deferred (noted in commit): the wind fill+particle double-decode needs deck-wind-layer to accept a preloaded texture.

tsc, biome, build all pass; chunk split confirmed in the build output.

Docs & attribution

  • N/A — perf, no source/behavior change.

- 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.)
@johncarmack1984 johncarmack1984 merged commit b1e9401 into main Jun 27, 2026
7 checks passed
@johncarmack1984 johncarmack1984 deleted the audit/perf branch June 27, 2026 05:00
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