Public: anyone can read this; the crew can change it.

The milestones page reuses its plan until the repository changes, so a repeat visit does not read the graph again #3429

shipped production is serving it opened this has it
opened this

Split from #3347: production measured 66-84 ms, most of it plan (readPlan in src/core/milestones.ts reads the repository's whole graph).

Done:

  • [ ] milestonesPage keeps readPlan's result in a ViewCache (src/view/cache.ts), keyed by the repository's latest event (repoHeads in src/web/map_cache.ts), whether the viewer may see spend, and the UTC day, with a TTL like LANE_TTL_MS, as docs/CACHING.md designs the map's.
  • [ ] Access stays out of the cache: who may read the repository and the seats are worked out on every request.
  • [ ] A test requests the page twice on the golden seed and shows that the second request does not call readPlan (a count, not a time); a new issue or a closed one makes the next request rebuild it.
  • [ ] The golden test from the issue this waits on still passes unchanged.
  • [ ] The pull states the plan phase before and after, from Server-Timing, as information, not as an assertion.

Files: src/web/pages/milestones.ts, a small cache module beside src/web/map_cache.ts or an export from it, one test.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs