Live data from Hacker News

Why is collapsing a Hacker News comment so slow?

github.com

121–123 of 123 posts

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

#121
post #39

I cannot visually notice any delay. It seems instantaneous in my browser.

It's really only an issue on mobile when you're collapsing larger threads. Try collapsing the first comment in this thread, for example: https://news.ycombinator.com/item?id=14656945 Not terrible, but there's a noticeable (maybe ~1 second on my phone) delay. My desktop is fast enough that it still feels instant.

Not great, not terrible.

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

#122
post #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?

Persisting it on the server allows users to browse on multiple devices and keep their collapse settings in sync. This is useful in particular for long threads of comments, where collapsing can be used as a tool to keep track of progress through the thread by collapsing comments along the way.

Actually i use the collapse feature for totally diffentent use case: Navigation.

I don't want to scroll over all the replies just to find the next post or i want to see all replies to one post. Therefore collapsing is convenient, but the slowth is annoying.

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

#123
post #96
post #8

Earlier quoted context omitted.

More like, "It kinda works, we don't give a crap".

That's not nice. I don't mind if you diss our code. But I do mind if you say we don't give a crap.

OP here. Dissing was not the intention of my post, if I can help in any way to improve HN let me know, would be more than glad to do so. Peace!
Post reply on HN