On May 22, 2010, at 9:44 AM, Milen Dzhumerov wrote:

> I've been writing some code that uses CATiledLayer and noticed that the 
> memory usage increased quite a bit - by a factor of 2, on average. Some 
> numbers that I've collected:
> Normally Sized Window
> - NS: 10mb; CA: 18.5mb
> Maximized Window:
> - NS: 23mb; CA: 45.7mb
> 
> I tried playing with the tile size and it looks like it has no effect on the 
> memory usage. If I just used a normal CALayer, the memory consumption was 
> somewhere in-between - an increase of about 1.5 with respect to the NS 
> version. I just wanted to ask whether that's the expected behavior of 
> CATiledLayer and whether I should be following any tips to keep that usage 
> down as much as possible.


CATiledLayer keeps a cache of the tiles that is has requested, and as such will 
likely use more memory over the short to medium term than a plain CALayer. If 
memory pressure gets high enough this cache should be flushed however. What 
problem are you trying to solve and how are you determining memory usage?
--
David Duncan
Apple DTS Animation and Printing

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to