Wishing people were
AO Gold Member
Join Date: Mar 2008
Location: The Beautiful UK
I'm in a bad mood today (see earlier Outsourcing thread in Rant Room if you are in the least bit interested why) and having to spend a lot of time on the Internet too as a result (getting numbers, searching for info etc). This is not a good combination.
So now on my iMac I run Mountain Lion rather than Yosemite because my iMac is a 2008 model and only has 2GB and I'm too mean to buy a new one. As a result I always run Dr Cleaner in the background to monitor memory usage and tidy up fragmentation when starting and stopping heavy memory usage apps like iTunes and iPhoto.
What I have noticed, however, is just how poorly written the memory management is of Safari.
After a clean boot my iMac shows utilization of around 80% of memory (so about 1.6 of the 2GB used) due to apps initialising, downloads etc etc. I run Dr Cleaner after each reboot and that brings utilization down to a steady state of around 55% usage.
If all I do then is launch Safari it goes up to around 70% memory utilization, but as I browse and switch windows/sites etc over the course of around 1 hour it shows utilization of 90-98% and everything slows riiiiight dooooowwwnnnnn. I then run Dr Cleaner again and get it back to 70-75% and go again.
And here's the rub - if I just exit Safari, it doesn't free much of it up (maybe a couple of percent).
Now - Why do I have to be manually in charge of memory cleanup? Why is Safari such a leaky app? Why does Apple's flagship browser do such a lousy job of memory management? Why is it ok for Apple to release stuff like this?
When I learned to code in the early 1980s you treated memory like the precious jewel that it was. If you allocated yourself a big old chunk of 8k RAM for your process, you had better return all 8k when you exited otherwise your boss, or your testing team, would send you back a snitty note about learning how to manage your heaps/stacks and queues before releasing code. It was a sin.
Nowadays we trash around with Gigabytes of memory and happily leave hundreds of Megabytes locked up and unusable at exit.
For what I do with my iMac, the 2GB should be quite enough. I shouldn't need to be hovering at 98% capacity most of the time.
Presumably in Cupertino they are too busy trying on Polo Neck jumpers and counting their self-congratulatory awards and share price to actually be doing a good tech job on writing code.