Hacker News new | past | comments | ask | show | jobs | submit login

We embed the assets in page to have the code for each section in one place - there's a lot of little logic & math to figure out the phrases (they're not just formatted numbers), and both the text & the graphs rely on the same source data so might as well do all the work while you've got the data right there.

It also allows us to serve the entire page in a single request, and the gzipping of the SVGs works really well (~7x).

Keep in mind that every single graph would need 15 languages * typically 2 units = 15-30 versions. And each page has 10-20 graphs. And you can view each location by year/season/month/day, and the stations have histories sometimes going back to the 40s with a page for every single day (not indexed by Google). Not to mention the comparisons - we have some 150k locations that can be compared up to 5 at a time.

The combinatorial explosion makes pre-gen unattractive, and producing each graph in a separate request would also increase both server load and developer headaches.

If we re-architected the site today I'd probably do client side rendering of the charts, but the dev cost of making that change now would so far exceed any gains that it's not even funny.

(To be clear, the by far biggest cost of the service is developer time, not hosting cost, sorry if I implied otherwise)




wow what a gross underestimate on my part for how big this project is.

is there somewhere i can read more? did you know it would cost this much before you started? was 15 languages just for completeness i can’t imagine ads paying that well in some markets




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: