A Word on Memory Usage


WinterBoard shouldn't really use much memory itself: it really shouldn't. I get a lot of reports of people claiming its using a lot of memory, but it is almost always that the virtual memory system, combined with the disk cache, has simply confused the issue.

That said, a theme might use a lot of memory, especially if it does anything involving HTML wallpapers (which shouldn't really be used except for special effects or as widgets).

But, it turns out that there is a major memory usage, though, which is that Apple has this SBImageCache system (which packs and backs with flash the icons used by SpringBoard) that I have to pretty much bypass in order to make themes like Leaf work.

The issue is that Apple's cache is designed to store icons of a fixed size, and I might not have images of that fixed size (Leaf's, for example, are quite a bit larger than standard).

Avid users of WinterBoard may remember when we upgraded to 2.1 and all such themes broke: this is why.

However, there's no reason I can't use Apple's cache if the images do fit in it, which ithey do 99% of the time (especially given that most icons aren't even themed). This new version of WinterBoard does this, and the savings are quite noticeable (I'd say a half megabyte per page of icons).

At this point, WinterBoard seems to use under a megabyte of memory, which I believe is just from the Objective-C runtime having to reallocate some things to make the hooks work. I'm still examining it, though, as I want WinterBoard to be as leightweight as possible.