Sunday, May 24, 2015

Why does everything consume so much RAM in Windows?

You may already have guessed what this screenshot is from from the title of this post, but if not, take a guess:

That's right, it's the RAM usage column of Windows' task manager. Do you notice something particular about it?

That's right, not a single process is taking less than 1 MB of RAM.

And mind you, I was not running any programs when I took this screenshot, with the exception of Skype (which is that 144 MB hog) and task manager itself. (And mind you, I just restarted Skype a few minutes before taking the screenshot. It's not like it has been running for days. This is the minimum that it takes.)

Why, oh why does everything in Windows take up so much RAM? Everything, and I mean everything, takes several megabytes of RAM. Heck, I can't find a single Windows program that would take less.

Perhaps Minesweeper? After all, it's one of the most rudimentary games in existence. Nope. A whopping 51 MB.

Notepad? Ok, it's a text editor, but it's extremely simplistic. Nope. Almost 2 MB.

How about calc? Surely that can't take much RAM right? Almost 7 MB. Even more than Notepad, even though calc does something extremely simple.

All those things that are listed in the screenshot are system services and background processes. Even the smallest one of them takes 1.1 MB of RAM. Not a single one takes less than that.

But consider Skype in particular. There's absolutely no rational reason why it should be taking 144MB of RAM. There's absolutely nothing in it that would require even a tenth of that. Yet it simply does, because reasons.

I believe that the fundamental reason behind all of this is highly incompetent and lazy programming. The kind of programming that simply doesn't care one iota about memory consumption, and liberally uses lots and lots of extremely wasteful data containers and other such routines with complete disregard to whether they are the right ones for the job, how many resources they will take, or if they are even needed at all. Things that any competent programmer wouldn't even think of using; it would just not even occur to them (instead they would naturally use something more efficient and more suitable for the task). And all this turned up to eleven.

No comments:

Post a Comment