Live data from Hacker News

Why is collapsing a Hacker News comment so slow?

github.com

101–110 of 123 posts

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

#101
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?

I would absolutely vote to do comment state saving in local storage. The need to have synced collapsed comments across devices is pretty minimal, compared to the performance increase that everybody will experience.

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

#102
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?

I would absolutely vote to do comment state saving in local storage. The need to have synced collapsed comments across devices is pretty minimal, compared to the performance increase that everybody will experience.

Removing a feature few know about for a small increase in performance for some?

Now that everyone knows about it people will start using it and people will start noticing the slowdown.

Somethings are best not mentioned

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

#103
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?

Holy heck. I always wondered why there wasn't a tag like that. Thanks!

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

#104
post #92

Earlier quoted context omitted.

It's also an issue when you don't even fully control the client, which in this case is the web browser. A game at least behaves exactly as you program it. Browsers are not necessarily consistent, especially when you throw in extensions.

Yes excellent point. Some browsers/plugins will prefetch every GET on the page to speed up browsing.

Some browsers also show a "here's your top 10 most visited webpages" shortcut when you make a new tab, which does a GET. I ran into that one when I was being lazy about building/testing an API.

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

#105
post #98
post #67

If you don't mind me being negative here for a moment: 1. It's not your website, why spend so much time and effort on dissecting the issue? If one did this for every webpage they visited it'd be a more than a full time job. 2. Does it really look like Hacker News has had any serious development effort poured into it anytime recently? What incentive does YC have to put time and money into a forum that generates zero r…

>1. It's not your website, why spend so much time and effort on dissecting the issue? If one did this for every webpage they visited it'd be a more than a full time job. 1) This is a community with a lot of web developers and programmers, and people who have a professional or hobby interest in these problems, and are hanging out here anyway clearly with nothing better to do. 2) We have to do it here because they don'…

[deleted]

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

#106
post #67

If you don't mind me being negative here for a moment: 1. It's not your website, why spend so much time and effort on dissecting the issue? If one did this for every webpage they visited it'd be a more than a full time job. 2. Does it really look like Hacker News has had any serious development effort poured into it anytime recently? What incentive does YC have to put time and money into a forum that generates zero r…

1. Too much free time I guess. I'm a frontend guy, I find frontend stuff interesting. 2. No. Probably none. 3. Are you saying that you are willing to sacrifice the user experience of the bottom 25% of the users of a website?

[deleted]

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

#107

Earlier quoted context omitted.

1. Too much free time I guess. I'm a frontend guy, I find frontend stuff interesting. 2. No. Probably none. 3. Are you saying that you are willing to sacrifice the user experience of the bottom 25% of the users of a website?

3) Most of the internet does this now. Even on my Q6600 PC, web sites grind to a halt. Whereas actual applications run just fine, even my 3d animation software. The overhead of the web has become unbearably lazy.

[deleted]

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

#108
post #67

If you don't mind me being negative here for a moment: 1. It's not your website, why spend so much time and effort on dissecting the issue? If one did this for every webpage they visited it'd be a more than a full time job. 2. Does it really look like Hacker News has had any serious development effort poured into it anytime recently? What incentive does YC have to put time and money into a forum that generates zero r…

"Generates zero revenue" is silly. Hacker News has certainly generated tens of millions of indirect profits for YC; probably much more. It's tremendous marketing value for the organization and its companies.

[deleted]

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

#109
post #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.

Okay. I'll bite. What is everyone talking about ?

I see an upvote triangle, a down vote [-] and nothing else. Is this a mobile only thing ? I can't see a way to collapse comments under Chrome or Safari on a desktop.

I am out of the loop what's the secret ?

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

#110

> 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'?

Tangentially related: I once built a page that logged you out of several services which implemented logout as GET requests (HN included). WARNING: might be better to visit it in incognito mode.

http://thewarpaint.github.io/hyperlogout/

Post reply on HN