Wasted memory by Foundation & AppKit


It bothers me that the iiUsage menu item, which takes up an entire 50mm^2 on my menu bar, uses 20 meg of memory. All it does it connect to a web server periodically, perform some sort of [probably trivial] parsing to extract it’s numbers, and display those in it’s menu. What on earth does it need 20 meg of memory for?

I still remember my first computer having 4 meg. And that was more than enough to multitask happily in System 7. Am I really to believe that iiUsage requires five times the power of my first computer, which was used for graphic design work at the time?

I think the problem lies in Cocoa, the set of frameworks used by most MacOS X applications. Most notably, Foundation and AppKit. Looking through the output of top, it seems that all apps which use Foundation and AppKit require at least 18 meg of memory. Yet I’m sure they never actually use whatever occupies this memory – it would be all the bits of Foundation & AppKit, regardless of which are used.

I currently have at least a dozen processes on my computer wasting memory in this way. I could save at least 200 meg of memory if these overheads were removed. Imagine what that would do for the Mac computing experience – low-end machines would suddenly fly along, free of the perpetual disk swapping of yesteryear.

I’m sure Apple have tried somewhat to reduce memory wastage by Foundation and AppKit, but I wonder if they’ve done nearly enough.

Leave a Reply