Demo by WebCRG — Tallowbrook Supply is fictional; the API is real and runs on Node.js.

Tallowbrook API

The same report, before and after

Tallowbrook’s sales report is served two ways by the same API. The legacy version loads each order, then its customer, then each product, one database query at a time. The optimized version asks for everything in three batched queries and caches the result until the data changes. Both return the same report.

Your sandbox

Not created yet.

Measure it from your browser

Seven requests to the live API: the legacy report three times, the optimized report three times, then once more with the ETag from the last answer. The times below are measured here, in your browser, and include the network.

What changed, and what is simulated