Blog
Short write-ups from building Foresite: making web apps fast, analytics in Postgres, and counting visitors without cookies.
We made our dashboard 35% faster without touching a single query
Our API answered in 40 ms, yet the dashboard took a second to open. Four fixes that cut round trips, not queries, and won back a third of the load time.
From 35 seconds to half a second: 70× faster dashboards in plain Postgres
A year-long analytics dashboard went from 35 seconds to half a second with daily rollups in plain Postgres. How we did it, and the one check that makes it safe.
The 30-line cache that made our dashboard feel instant
No library, no spinner: a 30-line stale-while-revalidate cache that makes going back to a dashboard view instant.
8 database trips down to 1: fixing the N+1 a join can't
When each item needs a different SQL query, a join won't fix your N+1. One UNION ALL turned eight database round trips into one.
Our tracking script is smaller than a favicon. How heavy is yours?
Your analytics script taxes every page view. A five-minute DevTools check for yours, and what a 941-byte script does differently.