Progressive JSON: stop waiting for the last byte

Cover art for Progressive JSON: stop waiting for the last byte

TL;DR: Send your data tree outside-in with placeholders for the slow parts, so one slow query stops holding up everything behind it. Why JSON's all-or-nothing wire format wastes time, and how sending the tree breadth-first with placeholders unlocks progressive loading. A progressive JPEG shows a fuzzy version of the whole image first, then sharpens it.

From · · 4m

TL;DR: Progressive JSON: stop waiting for the last byte

Why JSON's all-or-nothing wire format wastes time, and how sending the tree breadth-first with placeholders unlocks progressive loading.

Send your data tree outside-in with placeholders for the slow parts, so one slow query stops holding up everything behind it. Why JSON's all-or-nothing wire format wastes time, and how sending the tree breadth-first with placeholders unlocks progressive loading. A progressive JPEG shows a fuzzy version of the whole image first, then sharpens it.

  • Borrow the progressive JPEG trick
  • A simple blog payload
  • JSON is all or nothing
  • One slow query blocks everything

Read the story version — the same reporting as a swipeable deck of 20 cards.

Read the original on Overreacted

How we make summaries

React

Sign in to react and comment.

Comments (0)

Life is short. Keep it sweet. Respect others' opinions and be kind!

    Recommended next

    More decks on react and related topics.