← ALL FIELD NOTES

LOG 038 · TECHNICAL · 2023-11-01

Shipped prefetching, pulled it from prod the same day, then re-shipped it surgically

1 min read

Situation

In late 2023 I was working on the Goodpods web app, a podcast discovery product. Moving between pages meant fetching podcast, episode and curated-list data on every navigation, so page transitions felt slow. The goal was to make the app and website feel snappier for users.

Task

I took on building prefetching, so that hovering over a link or starting a navigation would warm the data for the next page and make transitions feel close to instant.

Action

I ran an initial prefetching experiment in November 2023, then built it out properly in early December. I wrote a prefetch hook for podcast data, then extended it to curated lists and episodes, cleaning up the hook as it spread to more places. Prefetching is speculative by nature: every prefetch is a backend request for a page the user might never open. Because of that cost, I disabled prefetching for guest users entirely; that decision was about backend load, nothing else. Then I deployed it to production. The deploy prefetched too much. The extra load maxed out our auto scaling and caused performance issues on the server. Rather than hotfix forward while production was degraded, I did a quick revert of the entire prefetch deploy the same day. With production stable again, I went back and made the prefetching more surgical, fixed the remaining bugs, and re-shipped it.

Result

After the re-ship, navigation was much faster. It was a hard thing to attach a metric to, but users and the client both reported the app and website feeling much snappier, which was the goal.