site banner

Small-Scale Question Sunday for April 21, 2024

Do you have a dumb question that you're kind of embarrassed to ask in the main thread? Is there something you're just not sure about?

This is your opportunity to ask questions. No question too simple or too silly.

Culture war topics are accepted, and proposals for a better intro post are appreciated.

1
Jump in the discussion.

No email address required.

VSCode for eating all of their RAM

I don't know where this myth came from - usually bad extensions are the memory hogs.

this is my VSCode at the moment - 3gb ram - way less than my browsers. And 32 GB ram was baseline dev computer 8 years ago.

Image Commit (KB) Working Set (KB)
Code.exe 229,192 203,380
Code.exe 196,436 181,052
Code.exe 181,540 158,272
Code.exe 146,848 143,044
Code.exe 170,172 146,452
Code.exe 158,840 142,484
Code.exe 116,608 114,484
Code.exe 149,196 117,328
Code.exe 112,392 98,688
Code.exe 90,580 92,056
Code.exe 86,820 97,276
Code.exe 1,423,064 86,692
Code.exe 73,020 76,104
Code.exe 73,356 75,808
Code.exe 56,140 61,656
Code.exe 56,864 59,304
Code.exe 50,748 41,668
Code.exe 39,788 44,236
Code.exe 37,548 43,608
Code.exe 23,656 22,300
Code.exe 22,832 21,832
Code.exe 21,308 20,340
Code.exe 21,208 20,296
Code.exe 20,956 20,192
Code.exe 20,924 22,388
Code.exe 21,160 23,428
Code.exe 17,980 16,276
Code.exe 17,992 16,244
Code.exe 18,004 15,824
Code.exe 15,096 21,176
Code.exe 11,004 9,376

Dude, 3 GB of RAM usage is in no way acceptable. You're saying "I don't know where this myth came from" while providing evidence that it's not a myth at all. VSCode is a memory hog, like all Electron apps.

Since when is 3GB memory hogging?

Since always. Even in the modern day when a system will easily have 16-32 GB of memory, that's 10% (or 20%) of the entire system! It's not remotely acceptable for a single app to take up that much memory.

By comparison, Sublime Text (which is very much in the same ballpark in terms of features) takes up 998 MB including memory shared with other processes. It uses just 210 MB discounting the shared memory!! That's the sort of performance you can get when software is written by people who give a shit, not lazy devs who go "eh Electron is fine, people have lots of RAM these days".

Since always. Even in the modern day when a system will easily have 16-32 GB of memory, that's 10% (or 20%) of the entire system! It's not remotely acceptable for a single app to take up that much memory.

Disagree. RAM exists to be used. There are lots of performance reasons for trading off memory utilization with CPU processing and storage IO, and a complex program which is a primary use case for a PC should make those tradeoffs in favor of more RAM utilization unless operating in a memory-constrained environment.

RAM exists to be used, and the app developer should humbly realize that the user (this is about the user, right?) may have a use for that RAM and therefore optimize the software.

That is pretty much how I feel as well. There's a trend I really dislike in the software industry to prioritize developers' ease of development over the quality of the users' experience. But ultimately, software should be written to deliver the best product to the user, not to be the easiest for the developers to make.

Since always. Even in the modern day when a system will easily have 16-32 GB of memory, that's 10% (or 20%) of the entire system! It's not remotely acceptable for a single app to take up that much memory.

Except VSCode and Brave and DBeaver are roughly 100% of what I do on a machine while developing.

So it follows that app being developed eats roughtly 0% of memory?

Look, if you're content for apps to hog memory because you use them exclusively I can't really stop you. Go nuts. But to me it's not an acceptable level of performance, because I use my computer for many things and I expect it to be able to support them all at once.

Ten years ago a brand-new processor would have been the Haswell- or Broadwell-era, and while you could get machines that could hold 32GB RAM, the H81 chipset only supported up to 16GB, going to 32GB would not have been standard, and it'd probably cost you upwards of 250 USD in RAM alone.

But more centrally, VSCode's linter and intellisense implementation is perfectly fine for mid-sized projects without a boatload of dependencies in certain languages. Get outside of those bounds, and its RAM usage can skyrocket. Python tends to get it hard (as does Java, tbf) because of popular libraries with massive and somewhat circular dependency graphs, but I've seen large C++ projects go absolutely tango uniform, with upwards of 10GB.

Yes, it is usually an extension problem, but given that you'll end up needing to install a few extensions for almost every language you work with just to get them compiling (nevermind debugging!), and that it's often even Microsoft-provided extensions (both vscode-cpptools and vscode-python have bitten me, personally) , that doesn't actually help a lot. Yes, you can solve it by finding the extension and disabling it, and sometimes there's even alternative extensions for the same task that do work.

The normal case isn't much worse, and sometimes is better, than alternatives like IntelliJ/PyCharm. But the worst cases are atrocious, and they're not just things hitting some rando on a github issue with some weird outlier use case.

going to 32GB would not have been standard, and it'd probably cost you upwards of 250 USD in RAM alone.

My PC built in 2016 with skylake (2015) had 64GB ram. My assembled in 2010 had 32. And with developer salaries being what it is - it was always affordable even in Eastern Europe.

32GB was possible on Sandy Bridge processors (technically 2011), but mid-range Westmere and Nehalim processors only supported 16GB(ish) for most of the consumer market, and even the high-end Bloomfield capped at 24GB. I'm not saying you didn't do it -- I've got a couple Xeon systems from that era floating around that could have -- but it was absolutely not a standard use case.

A more normal midrange system would be closer to 4GB, with 8GB as the splurge. You'd probably end up spending over 400 USD in RAM alone, plus needing to spec up your motherboard to support it (thanks, Intel for the fucky memory controller decision).

32GB was possible on Sandy Bridge processors (technically 2011),

So it probably was sandy bridge. It wasn't xeon with certainty. Too many years. I remember having core 2 duo 2006 or 7 with 8GB, I remember that the PC I built in 2016 had 64 (which I still hasn't changed, the performance growth in everything but the GPUs have been pathetic), and I remember that it replaced a PC with 32 - so it probably was early 2011. Also possible I build one in 2010 with 16 and then one in 2012 with 32.

Anyway RAM was peanuts compared to the payroll for developers so it didn't make any sense to not pump their workstations.

Wth, my 2018 pc only had 16 until I recently upgraded to 32. I think you were in the top fraction of a percent of users.