3 ms·
Hacker News itself is a good example of a related topic: voting here feels fast because the vote button disappears as soon as you click it, but it's actually ve
by Deimorz 7y ago
Hacker News itself is a good example of a related topic: voting here feels fast because the vote button disappears as soon as you click it, but it's actually very slow.
If you open your browser's Network panel in dev tools and vote on something, you'll see that it sends a request, gets back a 302 redirect, and then does another request to load a whole new copy of the page you were voting from in the background (and then just discards it). At least from my location, it consistently takes about 1.2 seconds for each vote to finish, even though it feels instant while using the site.
One consequence of this is that if you vote on multiple comments quickly, some of your votes are probably being lost with no indication. If you try to vote on something else before the first vote has fully finished, the second one gets a 503 error, but there's no indication of this at all.
It happens to me often - I read a good reply comment, vote it up, and then immediately vote up its parent (which I've already read) as well, since it resulted in that good comment. If I come back to the page later I'll notice that my vote on the parent didn't go through, and if you open the Network panel and try this, you'll see it - the second vote 503s if your second click was before the first one finished, but the site acts the same whether it failed or not.
- TeMPOraL 7y agoThat's a good observation. I've noticed it happening too, since I have a similar upvoting pattern: I tend to read a whole subtree, and then go back up, rapidly upvoting comments in it I considered insightful. I've noticed that the votes sometimes don't register, which is why I periodically reload the comment thread and reupvote comments. 'dang, is there any chance this gets improved?
- Deimorz 7y agoI tried emailing him about it a couple months ago, after I made this comment about a different downside of it (bandwidth usage / response size): https://news.ycombinator.com/item?id=20854662 https://news.ycombinator.com/item?id=20854662 He didn't consider it an issue worth fixing, and didn't reply to my long follow-up email trying to explain how wasteful and inefficient the current voting process is and how simple it would be to improve. It seems unlikely to change.
- theandrewbailey 7y agoI also notice that votes aren't registered if I close the tab immediately (within 1 second) after voting.