Improving performance by prefetching product pages from Etsy Search
Etsy used the Speculation Rules API to prefetch listing pages when a user hovers over a search result for 200ms (moderate eagerness). The A/B test cut p75 TTFB by 23.6% and FCP, LCP and DOMContentLoaded by about 20%, with roughly 40% of eligible browsers seeing near-zero TTFB at a 14:1 prefetch-to-navigation ratio. Several gotchas came up: only two speculative prefetches stay in memory, non-cacheable pages are kept for just five minutes, video shadow DOM swallows hover events, cookies get set during prefetch, and hrefs that mutate on hover break prefetching. Analytics needed rework, so event logging was deferred until page activation, using the Sec-Purpose header to detect prefetch requests.
Related posts
- Giving V8 a Heads-Up: Faster JavaScript Startup with Explicit Compile Hints
V8 mediumAdeptChrome 136 ships Explicit Compile Hints, which let developers mark a JavaScript file for eager compilation by placing the magic comment `//# allFunctionsCalledOnLoad` at the top. Eager compilation avoids a duplicate lightweight-then-full parse and moves compile work onto a background thread interleaved with network loading, instead of blocking the main thread on first call. In V8's experiment, 17 of 20 popular pages improved, with an average 630 ms reduction in foreground parse and compile time. Apply it sparingly to a core file because over-compiling costs time and memory, and verify the effect with `--log-function_events`. Per-function hints are planned.
- From latency to instant: Modernizing GitHub Issues navigation performance
GitHub Engineering mediumAdeptGitHub 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.
- 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.
- How Etsy gets its mobile apps ready for peak traffic
Sentry mediumAdeptBecause mobile apps can't be reverted once a binary ships, Etsy treats holiday peak prep as an October decision about visibility, routing and mitigation rather than capacity. Practices include a three-phase "code slush" that culminates in senior sign-off, dual-reporting crashes to the old and new vendors (Sentry) through peak, auditing remote experiment and operational flags so crash-prone code paths can be disabled without a release, and alerting only on crash-free rate and abnormal crashes per hour. Custom tags such as last screen reconcile code-based issue grouping with screen-based team ownership, and crash triage moved from a manual rotation to an MCP-driven agent whose assignment accuracy started near 30%. The team also translates crashes into estimated lost orders so the business can weigh them.
- Making fetch happen: Building a general-purpose query and render scheduler
Datadog Engineering mediumAdeptDatadog replaced a tangled ~20-parameter dashboard scheduler with separate, general-purpose query and render schedulers used by widgets across the product. The new query scheduler fetches visible widgets immediately and runs ranked offscreen fetches at up to 10 per fixed 2000ms window, pausing when pending fetches pile up. The result was a flatter request distribution and far fewer 429 errors. Rendering now goes through the Browser Scheduling API's postTask, with visible widgets at 'user-visible' priority and offscreen ones at 'background', which cut render count and duration and greatly reduced long tasks during interactions like drag-and-drop.