Why do simple apps use a lot of RAM?

Associate
Joined
28 Jun 2005
Posts
2,174
Location
Behind you
Hi Guys :)

Before people start jumping on me saying "Its only a few meg, you have loads so stop moaning", I'm only wondering why and not moaning :)

How come a simple app like Notepad for example uses over 2 megs of RAM when on say the Amiga a text editor would use a tenth of that?

Ta :)
 
Lots of reasons, including all the code included to allow it to draw using the Windows windowing system.

Aside from that, programming (and compilers) take a different approach these days, they used to compile with a focus on size, as RAM was limited, now they compile with a focus on speed, because RAM is plentiful, so why not use it and get the most speed you can upon run-time.

There are many other reasons, including the difference between languages etc.
 
The standard of modern application coding is shocking compared to what it was 10-15 years ago. Ever increasing amounts of available CPU power and RAM mean that there is less focus on performance and more focus on the pointless flashy bits.

My works laptop is a case in point. We use Lotus Notes which has been rewritten using Java and Eclipse so that it's platform independent (although it's only available for Windows!) so it loads a huge chunk of the Eclipse libraries every time. They're trying to move us away from Office onto Lotus Symphony which is also Eclipse based but uses a different version of the libraries so bang goes another chunk of RAM.

Sure there's the "you've got plenty of RAM" argument but it falls flat on it's face when you realise that most office PCs are the lowest of low spec junk. My current machine was barely up to the task when I got it and I've still got another 18 months before I'm due a new one :(
 
Hmmmmmmmm, so has programing easier or hardr now (in general). I'm guessing as hardware get faster programs need to be less optimised as they used to be and there isn't such a huge difference in speed as there used to be using different languages.
 
It's easier to get away with poor programming these days because there's so much resource headroom available usually.

I've forgotten how many times I've had to rewrite or bypass functionality in expensive commercial software packages simply because it's been designed and coded quickly without understanding how it will behave as the number of users or volume of data increases.
 
Hmmmmmmmm, so has programing easier or hardr now (in general). I'm guessing as hardware get faster programs need to be less optimised as they used to be and there isn't such a huge difference in speed as there used to be using different languages.

The difference now is that more people can "pick up" programming, however the best programmers out there will be just as capable as programmers who worked on systems with incredibly limited resources.

Arguably when people programmed purely in compiler, they produces cleaner code than anyone who now works in an OO high level language and relies on an automated compiler to optimise for them, ever could. However it can also be argued that being able to turn out a program that is 80% optimised compared to the 95% optimal code of old, in a fraction of the time, is a worthy trade-off given how much power and storage we now have.

And then of course there's interpreted languages like Java, which are a whole different kettle of fish again.
 
Ive also wondered about this!

Ever increasing amounts of available CPU power and RAM mean that there is less focus on performance and more focus on the pointless flashy bits.

Yea I agree, ditch the glass effects and glowy buttons and just give us somethin lean and mean!
 
The pointless flashy bits are what make your average computer user feel comfortable using a computer. Ergo they aren't pointless, they are an exercise in HCI.

Computers are now in the realm of being a consumer grade item and not specialist, they need to be accessible, as does the software that runs on them.
 
Notepad doesn't use 2MB of RAM!












It uses 7
Gism0.jpg
 
Yup, but has been said before, the glossy effects do slow it down a load. I think that since people tried to make programming easier, then people got sloppy. I loved my Amiga A4000 and it ran rings round most of my current pc's in actual snappiness and the quickness you could get stuff done. Hardly ever needed rebooting (record was 396 days without a reboot!) and ran a BBS without missing a beat. It had the outrageous at the time memory of 32 meg and about 100 gigs of storage....
 
I think slopiness and a lack of understanding of mathematics and computer programming in general has caused it. Faster and more powerful computers has allowed it.
 
Hint: It's not poor programming. Even a simple Hello World program can "use" (to the untrained eye) several mega bytes of memory nowadays.

It is fundamentally incorrect to refer to memory usage as RAM usage. As this implies you're talking about the program's private working set. When in fact the virtualisation of memory many decades ago resulted in things becoming more complicated than that. You have shared regions of memory. E.g. all the stuff for drawing the Window, "the glossy effects" is shared between all processes (that link to user32.dll) as a section of read-only memory. Infact linking to any DLL typically results in loading it into a shared memory space. That's partly why they are called dynamic link libraries (DLLs). That way you can have 100 processes that link to that DLL and the OS only needs to actually load it into memory once. Of course, plain jane old Task Manager doesn't make that particularly obvious from a glance.
 
I remember reading an article about this. When you code in lower level language like assembly you're working at a lower level and are able to optimize your code much more easily. Today's languages are much more higher level and as such you can't control what goes on lower down as much and you wouldn't want to either. :) It's not because of bad programming/coding either. You can print out a string in todays languages like 'Hello World' really easily with a couple lines of code. In assembly you'd have to set up the registers and init variables among other things before you could even start.

I've always wanted to learn assembly for a close system like the Megadrive (68000) but the documentation is lacking and it takes like 2 pages of code just to get it to render some coloured text on the screen.
 
Yea I agree, ditch the glass effects and glowy buttons and just give us somethin lean and mean!

Surely all that stuff is GPU-accelerated and actually makes the system feel faster? A Vista/7 system with Aero turned off tends to be heavier on the CPU, in my experience.
 
Back
Top Bottom