3 ms·
Calculating that stuff on the fly is simple and fast with a single hard-coded algorithm vs using a custom view per user. You would also need to store a lot more
by Retric 18y ago
Calculating that stuff on the fly is simple and fast with a single hard-coded algorithm vs using a custom view per user. You would also need to store a lot more information to be able to recalculate this stuff. Granted HN does not seem to cache it's pages, but it's one of the first options when looking to increase speed.
PS: Even just limiting sorting to the top 1000 overall stories and top 1000 new stories could be a major speed bump.
- colins_pride 18y agoI think I remember PG mentioning that with the new server everything fits in memory ... I see your point about speed, but I think that there are a bunch of shortcuts you can take (like your top 1k idea) that mitigate the issue, and if it is a feature you can switch off if you'd prefer to just go fast with the hard-coded, then ...