Finding and Eliminating Waterfalls

Waterfalls occur when the next operation cannot start until the previous operation finishes. They can occur in network requests, database queries, component rendering, or client effects.

Look for sequential await calls where operations are independent. Also examine nested components that each wait for their own data before rendering.

Streaming and parallel data fetching can reduce the impact of unavoidable slow operations.

Key Takeaways
  • Network waterfalls are a common source of latency.
  • Parallelize independent work.
  • Use streaming to avoid blocking the entire page on one slow component.