chapter four

4 Identify your critical paths

 

This chapter covers

  • What the critical path is and why it determines what users experience
  • How to locate critical paths by tracing from user goals to supporting operations
  • Platform-specific patterns for web, backend, mobile, and desktop
  • Deferral patterns that move non-essential work off the critical path
  • Data fetching strategies: parallel requests, batching, and prefetching

Speed comes not from making everything faster, but from knowing what users are actually waiting for. Shopify's mobile team started 2023 with a problem: their app launched too slowly, and screens loaded too slowly. By year's end, app launch was 44% faster, and screen load times had dropped by 59%. They achieved this by identifying exactly which operations users were waiting for and making those operations fast first, while pushing everything else to later[1].

This distinction between critical path work and everything else is your most important tactical insight. Most optimization techniques in later chapters depend on this foundation: you cannot make an application fast by optimizing randomly. You make it fast by identifying what users are actually waiting for and ensuring those operations complete as quickly as possible.

4.1 Locating the critical path

4.2 Platform-specific critical paths

4.2.1 Web paths

4.2.2 Backend paths

4.2.3 Mobile paths

4.2.4 Desktop paths

4.3 Deferral patterns

4.4 Data fetching patterns

4.4.1 Waterfall versus parallel fetching

4.4.2 Request coalescing and batching

4.4.3 Prefetching for perceived performance

4.5 Scaling up without slowing down

4.5.1 Database bottlenecks

4.5.2 Scaling infrastructure

4.5.3 Caching at scale

4.5.4 Rate limiting and load shedding

4.5.5 Asynchronous processing

4.5.6 Planning for scale

4.6 Summary