From latency to instant: Modernizing GitHub Issues navigation performance
GitHub made Issues navigation feel instant by moving to a local-first, stale-while-revalidate model: render issue pages from client-side data first, then revalidate in the background. A persistent IndexedDB cache made about 22% of React soft navigations instant at a ~33% hit rate, with roughly 4.7% server/cache divergence. Rate-limited, low-priority preheating from issue lists and an in-memory cache tier raised the hit ratio to ~96%, so up to ~70% of React navigations became instant. A service worker extends the cache to Turbo and hard navigations by signalling cache hits via a request header, letting the server return a thin HTML shell instead of a full server-rendered page. The tradeoff on hard navigations is that the critical path shifts to JavaScript download and execution.
Related posts
- Improving Shopify App’s Performance
Shopify Engineering mediumAdeptShopify cut its React Native mobile app's P75 launch time by 44% and screen load times by 59% over 2023, against targets of 2s launch and 500ms critical-screen loads. The fixes fell into three themes. The first was deferring work until it is needed: FlashList-based LazyScrollView and ListSource render only visible content, inlineRequires in the Metro config alone gave a 17% launch gain, and slow native modules were fixed. The second was eliminating unnecessary work: freezing back-stack screens cut navigation time by up to 70%, Restyle allocations were trimmed, and default state batching improved screen loads by about 15%. The third was maximizing cache use by fixing a GraphQL cache bug and pre-warming caches so up to 90% of merchants see cached data first.
- How we built it: incident.io Status Pages
incident.io mediumAdeptincident.io built its Status Pages product in three months on Vercel and Next.js, using Incremental Static Regeneration with per-fetch revalidate times (e.g. 30s) so the backend serves only a couple of requests per minute regardless of traffic spikes. Pages are pre-built via generateStaticParams, added on demand when created, and refreshed with stale-while-revalidate, while the client uses the SWR library with a 10s refreshInterval, revalidateOnFocus and server-rendered fallbackData for live updates. Server rendering is pinned to Vercel's Dublin region next to the API, and live-reload requests are proxied through Next rewrites. The main pain point was hydration mismatches from relative times and locale/time-zone formatting, handled with explicit luxon zones/locales and lint rules against unguarded "now".
- Remixing Shopify's Admin: How We Made It 30% Faster and AI-Ready
Shopify Engineering mediumAdeptShopify migrated its Admin (67 million daily page views, 101 teams, ~350 PRs merged daily, 3M+ lines of TypeScript) to Remix in SPA mode with Vite. The result is a 30% improvement in perceived load times. Statically globbed, typed route manifests replaced a runtime getRoutes function and give Search and Sidekick a single source of truth for all 1,017 routes. Remix loaders remove the code-then-data waterfall by fetching a 3.2kb loader in parallel with a 914kb component bundle, and idle-time prefetching of loaders warms an Apollo cache persisted in IndexedDB. Adding Remix actions and zod schemas lets the Sidekick AI fill and submit forms without loading UI JavaScript.
- Rendering huge pull requests in the GitHub Copilot app
GitHub Engineering mediumAdeptThe GitHub Copilot app's pull request view stays responsive on a 2,200-file, million-line diff with 400+ review comments by splitting document height into two geometries: exact, precomputed prefix-summed code rows and lazily measured dynamic blocks for comments, drafts and composers. A single idle- and scroll-gated measurement pass scoped to about 2400px around the viewport replaces per-block ResizeObserver write-back, which caused feedback loops. Observers only flag blocks for re-measurement, except for user-caused resizes, which commit synchronously at most once per frame. Identity-based scroll anchoring keeps corrections small, and a cache of recent diffs prevents an instantly drawn shell from sitting around an empty diff. Bugs were found with permanent in-app probes asserted as CI budgets and an autonomous headless change→measure→improve loop.
- The uphill climb of making diff lines performant
GitHub Engineering mediumAdeptGitHub rebuilt the React diff-line components in the pull request Files changed tab after large PRs pushed the JavaScript heap past 1 GB, DOM counts above 400,000 and INP to unusable levels. The v2 design cut per-line React components from eight to two, replaced per-line event handlers with a single top-level handler keyed on data attributes, and moved commenting and menu state into conditionally rendered children. It also confined useEffect to the file level and switched to O(1) Map-based lookups. On a 10,000-line split diff this cut rendered components by 74%, memory by about 50% and INP from ~450 ms to ~100 ms. For p95+ PRs, TanStack Virtual windowing gave a 10x heap and DOM reduction and 40–80 ms INP, supplemented by cheaper CSS selectors, GPU transforms, partial hydration and progressive diff loading.