Live data from Hacker News

Why I Still Use Vim

medium.com

51–60 of 209 posts

Re: Why I Still Use Vim

#51

Being in 2 slack teams use up as much memory as the entire visual studio 2017 does on my machine. It is electron that is the root cause here and it is the same for all electron based apps.

Has anyone published a memory-map - a breakdown of what exactly is in the process' memory space - of these cases where Electron-based applications use orders-of-magnitude more memory than the native programs we used before?

Previously I've remarked that high memory usage in web-browsers in itself is not a cause for alarm, and is mostly a good thing because it means the browser is aggressively caching assets so future pageloads will be much faster without needing to load things from disk - however that doesn't apply to Electron-based software because all of the assets are local already so there's nothing to cache that won't be loaded into memory already. So - I'm willing to bet that Electron's high memory usage is probably the JavaScript part - because a native DOM itself, even with all layout information and source assets for images and backgrounds, cannot be more than a few megabytes for even a complicated page (memory usage only shoots up once you start having to download 20MB+ autoplaying video ads). Then multiply the usage overhead of the V8 engine multiple times for the fact that Electron uses V8 to run Node internally, and for each process instance it spawns in the name of reliability - these child processes shouldn't be necessary: "desktop software" shouldn't be running untrusted scripts downloaded from the Internet (WebViews notwithstanding - but they can be isolated already) so adequate testing (and good software design) will ensure a JavaScript snippet will not bring down a process. If they insist on spamming processes, what does that say about their confidence in their code-quality?

I'll join-in on the Slack-bashing. I know Slack is very capable and a breath of fresh air compared to Lync/Skype-for-Business, but right now it's consuming 755MB (70% private) between 6 slack.exe process instances on my machine - while the native Windows Telegram client (written in Qt) - with considerably more human-useful-data in-memory (over 200+ groups/channels/etc) is taking up a relatively miserly 133MB (85% private).

Re: Why I Still Use Vim

#52
I recall the Turbo Pascal text-mode IDE that left enough space to actually run the programs you were developing. The machines had 640KB RAM, and I think the IDE was using perhaps as much as 100KB.

I recall using fully-featured GUI IDEs like VB, VC++ etc on machines with whopping 64MB RAM, and having enough space left to actually run the programs you were developing.

I have a laptop now with 16GB RAM. The other day I tried to edit a large text log file in Atom and it ran out of memory. That was the first - and last - time I tried to use Atom. I went back to my fav editor, jEdit, which currently says in its tray that its using a whopping 28MB RAM. No idea what it can be doing to fill that up, as I have barely anything open. But still...

Re: Why I Still Use Vim

#53
post #32

Earlier quoted context omitted.

>I couldn't write a plugin for Sublime to embed a web browser. Yes - that is true. and, with atom basically being a web browser, it is trivial for them to do it. >I couldn't write a plugin for Sublime to display images inline by fetching their URL if found in the source I actually think that is now possible in ST3. With the new "Phantom" plugin API it can certainly inject a subset of html (including tags) into the vi…

>with atom basically being a web browser, it is trivial for them to do it. Which was the point of them making it in a web browser. Leverage that as a platform to make extensions/plugins easier to write and maintain and allow them to do more. Atom is a more capable "IDE" than any other IDE i've ever used, and it's easier to create and manage plugins for. Yeah, there are still some rough edges and things that I hate ab…

Now, I haven't worked on web in a while, but what advantages does having an in IDE browser of a random provenance (it trails Chromium by 2-3 weeks) vs using a known version in a separate window beside it?

edit: spelling

Re: Why I Still Use Vim

#54
post #6

These kinds of comparisons always seemed a bit silly to me. It's like complaining that opening a 6MB file in windows took over 3GB on my system! (ignoring that most of that is the OS getting ready to do other things, and enabling the OS to do things other than opening and reading a 6MB file). Yes, Atom isn't the most resource friendly editor out there, and nobody is claiming it is. But it is one of the more capable e…

This is ridiculous. I just should not complain that some program is useless and terribly resource hungry? What will be next? "Stop complaining that the browser uses 10GB of ram to show a page, as it is bigger than standard page"? This is just ridiculous. For showing the html I just use multiple browsers. My page must look good in multiple browsers, not in my editor. For the whole environment I just consoles with full…

Why complain and not just use another program? There's many options. But if you like using Atom and also like complaining - then you're like a helpless baby crying for attention.

Submit a PR and be done with it! Viva la open source revolución!

Re: Why I Still Use Vim

#55
post #32

Earlier quoted context omitted.

>I couldn't write a plugin for Sublime to embed a web browser. Yes - that is true. and, with atom basically being a web browser, it is trivial for them to do it. >I couldn't write a plugin for Sublime to display images inline by fetching their URL if found in the source I actually think that is now possible in ST3. With the new "Phantom" plugin API it can certainly inject a subset of html (including tags) into the vi…

>with atom basically being a web browser, it is trivial for them to do it. Which was the point of them making it in a web browser. Leverage that as a platform to make extensions/plugins easier to write and maintain and allow them to do more. Atom is a more capable "IDE" than any other IDE i've ever used, and it's easier to create and manage plugins for. Yeah, there are still some rough edges and things that I hate ab…

> Atom is a more capable "IDE" than any other IDE i've ever used

That says more about you than it does about atom.

You should check out the IDEA line of IDEs sometimes.

Re: Why I Still Use Vim

#56
post #6

These kinds of comparisons always seemed a bit silly to me. It's like complaining that opening a 6MB file in windows took over 3GB on my system! (ignoring that most of that is the OS getting ready to do other things, and enabling the OS to do things other than opening and reading a 6MB file). Yes, Atom isn't the most resource friendly editor out there, and nobody is claiming it is. But it is one of the more capable e…

This is ridiculous. I just should not complain that some program is useless and terribly resource hungry? What will be next? "Stop complaining that the browser uses 10GB of ram to show a page, as it is bigger than standard page"? This is just ridiculous. For showing the html I just use multiple browsers. My page must look good in multiple browsers, not in my editor. For the whole environment I just consoles with full…

You don't need to like Atom, but to claim it's a "bad editor" for everyone is silly.

You can use multiple browsers to preview, I prefer to have it in the editor which makes it easier to switch between (same argument for code tabs vs windows). I still test and work in multiple browsers to ensure compatibility, but being able to get the rough parts laid out in the editor itself and fix/develop on things that are the same in all browsers is a great productivity boon (especially when i'm working on my laptop with limited screen real estate).

And again, I could run everything in a separate console window, logging to files, etc... But having that in the browser is a boon to my productivity. Having notifications in the browser window that a test that was running in the background failed and being able to click a button and open right to the test file + source file that failed along with annotations about coverage data in the sidebar saves me quite a lot of time and effort.

If Atom is useless for you, don't use it! But don't act like it's garbage for everyone. I don't need a car that goes 200MPH but that doesn't mean every F1 car is entirely useless, just that it's designed for a different purpose.

I currently have 3 different atom windows open, each with 1-4 panes with probably 5-20 tabs open in each and it's using a whopping 1.8GB (super rough counting, didn't want to actually add it all up). That's a lot, but it's not enough to outweigh the benefits for me. I'm not "sticking hardly to one regardless the pain", i'm sticking to the one which makes me the most productive and is the "nicest" for me to use (if i'm frusturated by constantly finding windows, i'm not going to be a better developer) It might be too slow/bloated/whatever for you, and that's okay, but for me it's more than fine.

Re: Why I Still Use Vim

#59
post #6

These kinds of comparisons always seemed a bit silly to me. It's like complaining that opening a 6MB file in windows took over 3GB on my system! (ignoring that most of that is the OS getting ready to do other things, and enabling the OS to do things other than opening and reading a 6MB file). Yes, Atom isn't the most resource friendly editor out there, and nobody is claiming it is. But it is one of the more capable e…

Sometimes I try and open a massive XML file in Atom, it chokes and I have to kill the process. That doesn't stop me using it because the other 99% of the time it's a great user experience and the memory usage is completely irrelevant to me.

The thing about unoptimized code -- memory usage for large files in this case -- is that you can optimise it if and when it becomes a problem. No, Atom is never going to be nearly as small as Vim. But it could be a lot less than 3GB if it had to be.

Post reply on HN