3 ms·
this 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.
by enriquto 7y ago
this 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.