Live data from Hacker News

Why is collapsing a Hacker News comment so slow?

github.com

11–20 of 123 posts

Re: Why is collapsing a Hacker News comment so slow?

#11

> There is also a GET request to https://news.ycombinator.com/collapse?id=1234567 to save the state of the collapsed/expanded comment if the user is logged in, but it's an async request so it doesn't have an impact. Is this a correct place to use 'GET'?

why not store this state client-side?

Re: Why is collapsing a Hacker News comment so slow?

#12

> There is also a GET request to https://news.ycombinator.com/collapse?id=1234567 to save the state of the collapsed/expanded comment if the user is logged in, but it's an async request so it doesn't have an impact. Is this a correct place to use 'GET'?

why not store this state client-side?

I might visit Hackernews using multiple user-agents.

Re: Why is collapsing a Hacker News comment so slow?

#15
I am just now realizing that HN comments are collapsible...I wonder if anyone has ever looked at upvote/scroll behavior when the collapse button is used vs not? There are a ton of threads where the top comment is also a non-sequitur, but I know when that happens I frequently don't scroll past the hundreds of replies to see what the other first level comments are.

Re: Why is collapsing a Hacker News comment so slow?

#16
I would use the tag to solve this problem. Most people don't know this exists and I have no idea why. You would probably have to rewrite the html so it no longer uses tables but I don't really consider that to be a negative.

I would also question why we are saving collapsed comments. I feel like this is something that doesn't need to be persisted forever. If you want this behavior why not use local storage instead?

Post reply on HN