Live data from Hacker News

Why is collapsing a Hacker News comment so slow?

github.com

81–90 of 123 posts

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

#81
post #34

Earlier quoted context omitted.

Edge is turning into Chromium soon, so that shouldn't be a problem for much longer.

Considering there are millions of people still using IE11, I'd say it will continue being a problem for a long time. 18% of my users are on IE11. Some industries (healthcare, for example) don't change if they don't perceive something to be broken.

To be fair, if we're staying in the parameters of the thought experiment, we're targeting the HN user base, which I suspect isn't using IE11 at nearly that rate...

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

#82
post #30

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

Same. I am really picky about performance, and I've never seen anything but instantaneous response from collapsing comments. I just tried it right now on a few example threads from the home page and confirmed that it's instantaneous. I would estimate less than 50ms. I can rapidly click a + and - and collapse/expand a comment tree more or less as fast as I can click (the limiting factor being that my browser wants to…

I've only noticed on mobile

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

#83
post #66

Earlier quoted context omitted.

Following the rules of REST is very important if you are presenting a public API to the world. If it's your own server you can do whatever you want. For example I used to work on servers for games and often there would be a single endpoint for processing one or more commands, and this would be technically a GET request regardless of what those commands did. Furthermore it's common to send application level error deta…

> If it's your own server you can do whatever you want. This is not at all true. For example, say I'm a user in a dorm that uses a proxy that I have no control over. If you make your GET request modify things, that proxy may cache the request, or worse, may repeat the request later to maintain its cache. My point is, you don't know what is between your server and their client, and even well behaved infrastructure wil…

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.

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

#84
post #58

Earlier quoted context omitted.

Doesn't Edge auto-update though? How easy would it be, as someone in enterprise IT, to keep users on an old version of Edge?

The reason is active-x, somebody wrote a way to scan with active-x and now virtually every healthcare web app works that way.

This was before webcam support was mainstream in browsers. Capturing stills from ultrasound is in many legacy systems still done with a TV capture card and the really old legacy cards don't even use any standard API but carry their own driver so you can't use them as a webcam but need the vendor app.

source: did support for a doctor some years ago

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

#85
post #61

Earlier quoted context omitted.

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.

Sure I get that this is possible given that you know this is what the code does but the bigger questions are who knows that you can do this, and who actually uses this feature? Is this the expected behavior when you collapse or show a thread? I would suggest that it is not, as most minor interactions on a page are only stored locally. How many people actually use this feature? In order get a benefit from this feature…

> you can just scroll past the stuff you've already read, which has a minimal cost to the user.

Both vote count and age influence the order of comments, which means that the stuff you've already read may appear below stuff you haven't read yet.

If you use the feature at all, I'm not sure why you wouldn't want collapsed comments to be in sync across devices.

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

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

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.

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

#87
I wrote a browser extension to collapse HN comments past the first depth and ended up just attaching their css classes and setting the sub-comment count myself. It was the fastest behavior I could find at the time for reasons I've since forgotten. I did try to use their existing js but it took forever to collapse the page.

Here's my collapse code if interested

https://github.com/a13o/disengaged/blob/master/src/hacker-ne...

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

#88
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.

A way to reproduce is to use your browser's profiling tools to throttle your CPU.

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

#89
post #61

Earlier quoted context omitted.

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.

Sure I get that this is possible given that you know this is what the code does but the bigger questions are who knows that you can do this, and who actually uses this feature? Is this the expected behavior when you collapse or show a thread? I would suggest that it is not, as most minor interactions on a page are only stored locally. How many people actually use this feature? In order get a benefit from this feature…

> Sure I get that this is possible given that you know this is what the code does but the bigger questions are who knows that you can do this, and who actually uses this feature?

I do.

> In order get a benefit from this feature you have to be logged into hacker news on multiple devices, collapse a thread on one device, come back to that thread later on the second device and then continue reading from where you left off.

I actually do exactly this. I read on my phone/laptop and later come back to the same thread (when more people have commented) on my home computer, usually at the end of the day. Having threads of conversation that you are not interested in already collapsed on multiple devices is very useful.

> Alternatively you can just scroll past the stuff you've already read, which has a minimal cost to the user.

Scrolling and quickly scanning over multiple threads is more time consuming and becomes actually annoying if you just want to passively follow a thread. If you want to follow multiple threads under the same topic, you either have to remember unique words/usernames/dates of that thread or resort to scroll & scan method mentioned above. One is annoying, the other is simply non viable for N amount of threads.

Until there is a way to subscribe to a thread, this feature is super helpful. Its actually just as good or better than a subscribe mechanism because atleast you can avoid getting multiple notifications for every single comment that get posted in the interesting thread. In the current scheme, all the irrelevant ones are already out of your way.

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

#90
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.

One answer to this is to paginate long threads so there's a definite upper limit to the length and depth of the thread on any page.
Post reply on HN