Skip to content

fix: overlap GitHub activity cache reads - #188

Merged
f0rr0 merged 2 commits into
nextfrom
f0rr0/page-load-performance
Oct 1, 2026
Merged

f0rr0 merged 2 commits into
nextfrom
f0rr0/page-load-performance

Conversation

@f0rr0

@f0rr0 f0rr0 commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

Initial GitHub activity reads introduced in #187 wait for the content cache and then the outage cache. Slow cache round trips can push an otherwise healthy read past its one-second deadline and return an older fallback.

Start both cache lookups together. When the outage cache needs refreshing, it awaits the same successful content snapshot, preserving the database-read savings. Keep the metadata consistency guards, cache lifetimes, invalidation and outage deadline. This change affects the shared server path used by Home, Work and worker warming; it adds no loading UI or analytics changes.

Validation:

  • Focused unit tests use mocked activity inputs and a stub cache backend, with controlled promises rather than latency sleeps. They check overlap, fresh metadata, and reuse of the same content when the backup is missing. Both fail against the old serial implementation and pass with the fix.
  • 289 tests pass without a database; 3 pre-existing optional database integration tests are skipped. This PR adds no database-dependent tests and leaves those existing tests unchanged.
  • Production-mode native Next checks pass for cache expiry, failed rebuilds, outage recovery and slow publication races.
  • Desktop and mobile browser checks pass for pagination, refresh/retry, expansion retention, day ordering, overflow and runtime errors.
  • Lint, typecheck and production build pass. The build emitted existing GitHub embed HTTP 403 fallback messages. The production implementation is unchanged from the already validated version; this update changes only tests.

Live investigation captured Home/Work regeneration responses around 3.5/2.6 seconds and fast cached responses. This fixes a reproduced server regression; the overall production latency improvement still needs measurement after deployment.

@vercel

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
f0rr0-github-io Ready Ready Preview Oct 1, 2026 3:50am UTC

@f0rr0
f0rr0 merged commit 82b4bdc into next Oct 1, 2026
4 checks passed
@f0rr0
f0rr0 deleted the f0rr0/page-load-performance branch October 1, 2026 19:50

This branch was successfully deployed

1 active deployment
Preview — 7d643137 Deployed Oct 1, 2026 by vercel[bot]
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