Frontend · interactive
Data fetching without waterfalls
A profile page needs the user, then their posts, then the posts' comments, plus an unrelated sidebar. If each component fetches only after its parent has rendered, requests line up one behind another. Each request here is a 120 ms round trip plus 30 ms of work.
- user190 ms
- posts380 ms
- comments570 ms
- sidebar380 ms
page complete at 610 ms
The sidebar waits for the user even though it doesn't need it, and every step also waits for a render. Three round trips in a row, plus render gaps.
Strategy
Step 1 of 4 · read left to right
In production
Tools and technologies
Data libraries and frameworks exist largely to avoid waterfalls.
Not tied to one language — use these names when you search docs or design a system.