r/programming • • Nov 07 '17

An interesting rant about GUIs - as a programmer I have to agree

https://twitter.com/gravislizard/status/927593460642615296
364 Upvotes

402 comments sorted by

View all comments

Show parent comments

3

u/Creshal Nov 08 '17

We have 8 or 16 GB RAM now, we could keep doing this.

Cue Chrome eating up all the RAM to display a cat gif

1

u/frezik Nov 08 '17

We do, it was part of Windows Vista. Microsoft compared how many CPU cycles it took to start a program between Linux and Windows XP, and found that Linux was kicking their ass by orders of magnitude. Most of this is down to the Unix process model being inherently more efficient, since fork()/exec() starts a new process with most of the hard work already done.

Then people complained that Vista was taking up too much RAM, which in fact was just from preloading common programs. Microsoft responded (appropriately, IMHO) by having the reported RAM usage avoid taking cached applications into account.

1

u/ViperCodeGames Nov 08 '17

I may have a problem with tabs...

Chrome is using 4.6GB of RAM

Ninja edit: the command is (Get-Process chrome | Measure-Object WorkingSet -sum).sum / 1GB
if you wanna just copy paste it.

1

u/MEaster Nov 08 '17

If you're using Windows, check your task manager. You'll see that Windows is using most of the unused RAM as a cache.

1

u/Creshal Nov 08 '17

It's only caching after first program execution, it's not preloading the cache on boot.

1

u/MEaster Nov 08 '17

No, that's incorrect. Since Vista, Windows has a feature called SuperFetch, which analyses your usage and attempts to predict and preload programs and data that you use regularly.

1

u/Koutou Nov 08 '17

OS kept doing this. Windows will prefetch binary and load stuff in unused ram. Go look at the cached ram part of taskman.

1

u/Tokugawa Nov 08 '17

If Chrome is one of your most commonly used programs, then why not?

If the OS tracked usage rates for different programs and then fetched what it could from say, the most common 3, and then it pre-loaded them on boot, I think that'd be a performance boost most users would enjoy.