CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

perf(homecoming): contributors + coupling cached by branch tip — 1.7s to instant #5530

Merged⚡ AI-generatedXSccantynz wants to mergeperf/history-page-cachingmainopened 8d ago
ccantynzcommented 8d ago

Homecoming pillar 1: the two slowest rooms

/contributors ran three full-history git walks per page load (shortlog, log --numstat over all history, year-window log); /coupling ran two full-history analyses — ~1.7s each, for every visitor, on a page whose data only changes when commits land.

  • Both now cache derived data in gitCache keyed by owner/repo:page:ref:TIP-SHA — the tip in the key makes correctness independent of push-side invalidation (which also fires, belt-and-braces).
  • /contributors' verified-account matching deliberately stays live (one indexed DB query): a user who registers today must light up on their old commits immediately, not after the next push.
  • Contributors' computation factored whole into computeContributorHistory — byte-identical semantics, now ownable by the cache wrapper.

Expected: first hit after a push pays the old cost once; every other view is served from memory in tens of milliseconds. Typecheck clean; route-gate + nav-detection tests green.

🤖 Generated with Claude Code

ccantynzAI Reviewcommented 8d ago

AI Triage

(no summary)

Priority: medium Risk area: mixed

Suggested labels: (no label suggestions) Suggested reviewers: (no reviewer suggestions)

Suggestions only — nothing has been applied. The PR author stays in control.

gluecron[bot]🤖 botAI Reviewcommented 8d ago

AI review unavailable

The platform's AI balance is exhausted, so AI generation is temporarily unavailable. Nothing was lost. You can queue this as a repair for the internal agent from the repository's Health page, or try again once the balance is restored. The PR is otherwise unchanged.

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts