4 ms·
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.
by krapp 7y ago
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.
- enriquto 7y agothis is a bit ridiculous... folding a few thousand lines of plain text should be fast no matter what. If it isn't, then there's something quite wrong.
- krapp 7y agoI don't want to knock dang or whoever wrote it but when I look at HN's JS it looks to me like it was written more to resemble Lisp idioms and to look elegant than to be efficient. If so, that may just be someone working in their comfort zone, which is fine - it works, and if it were much more complex than it is, HN being HN would complain. It's not bad, it just doesn't scale. Also, I suspect but don't know that the table based layout makes showing and hiding elements a lot slower than it would be with, say, divs or an unordered list. If this is the case, it would probably only be exacerbated on mobile.