Performance: load posts one by one.
I saw a lot of performance commits lately, so I thought I'd mention this one. /Home/TopPosts/?sort=Score returns a huge list of posts including content. I think you are loading all posts of the page at once (until you hit load more). Instead of letting users wait for this huge request to complete, you could load the first post and then others in the background. You could load a list of post ids first and then with some JS magic load the actual posts. That would increase traffic, but I guess reduce the time a user has to wait before he gets content. (First meaningful print?)
Just did some pseudo benchmarks, the big list always took over a second (max was 3,7s) seconds to respond, a single post (main request with the content) usually took under a second (max was 1,2s). I'm not a web frontend kinda guy, I just saw this in the traffic, but to me it looks like this would make a performance difference to the user.
The issue with this is that we would still want to load the posts from top to bottom so you don't have the page jumping all over as posts load. I load the top 10 posts to start, and incrementally load more. I think that's a pretty low number to start with. I could reduce it to load the first page faster.
still want to load the posts from top to bottom
I didn't mean concurrently, I literally meant one by one, from top to bottom, maybe in chunks (apart from the load more button). I just think if I'm not seeing the content of this huge response all at once, why load it all at once.
The idea is, at first make sure the user has something to read, then make sure there's something to scroll down.
I'm going to see how it looks if I load only 5 posts at a time. Even so - the issue is not the size of the response (it's relatively small) but the time it takes to query the DB and generate the HTML. Remember - each user will see a different page depending on their language settings, their ignores, and follows. I've already made it much faster than it used to be - but no question I can improve it!
I would love the advice and eyes-on from a front-end expert.