Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Any text editor that struggles to load a large text file on a modern computer is, simply put, inefficient. If 20 years ago they managed to write programs that could handle such cases and today many (web) apps fail at this task means we're going backward.

My point is that it's much harder to write efficient code in the web ecosystem because you're bound to specific abstractions from the browser. Once deviating from said abstractions, it's not trivial to write efficient code.



> Any text editor that struggles to load a large text file...

Define "large". If it's bigger than the biggest text file I'll ever open, then I don't care.

My point is that "efficient" code isn't absolutely necessary in many, many cases.


The problem with that mentality is that you start seeing inefficiencies spring everywhere (why loading Discord takes so long? Slack? etc, etc).


Inefficiency also compounds. If you're sending too much data over an unreliable connection using a bloated protocol (say), you have three multipliers. Now start daisy-chaining these things together, host them on bloated images on pods in underpacked nodes in k8s (not a potshot at k8s, which I like quite a bit, just... another plausible source of inefficiency). Write all the servers in Python (or worse, some Ruby on Rails backed by MySQL or something comically underperformant).

We could keep going, but it maths out to mind-blowing amounts of waste just copying bytes around between buffers with no value add.

(Old man editorializing at clouds: "and all so we can employ people who don't know how computers work to satisfy corporate product pipelines by shoveling digital shit onto people that they neither want nor need")


The old metaphor of shipping bananas by packing the entire jungle surrounding the ape that’s holding the banana does very well to illustrate the truly egregious level of inefficiency at play here, especially when one considers how there’s tens or hundreds of thousands of these jungles involved in any given product…


It’s a third world mindset where we end up with the software equivalent of public defecation, living in squalor and filth.


How is Discord not loading fast enough the result of a “third world mindset”? Is this one of those “this software is bad because it was made in China / India / outsourced to one of those countries” arguments (which I don’t even think applies to this topic???)


I’ve routinely needed to open a 5GB text file on my computer before (previous job), and only some “apps” can do it. If we even call them apps lol. It’s just bloated web browser junk packaged to look like a native app.

notepad++ solved this problem 20+ years ago.

I agree it’s an uncommon use case but it’s kind of sad when an app struggles to open a file like that on a modern machine in 2024. Just sad.


I've recently been summarizing entire directories into a single chunk of text for use with Gemini, the other day I overshot and ended up pasting 28 million characters into vscode. It handled it pretty well.


that’s like a 28MB file, no? That’s not exactly impressive to me on a modern computer in 2024. Maybe i’m crazy haha.

I’d consider 28MB to be a medium sized file. Maybe 100MB+ would be large?


I don’t know that I completely agree. It depends on the functionality offered, right? Like vim, for example, can struggle with very large files if you ask it to do syntax highlighting all the way from the beginning (or, it can give you syntax highlighting that is just wrong if you don’t). I don’t think vim is very inefficient (could be wrong there, though), and I don’t see any way to generally do syntax highlighting without looking at the whole file (although, of course, in practice there are often shortcuts for specific languages…)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: