On 30/06/2009, at 2:10 AM, Anders Lassen wrote:

Is a font a large object that requires a lot of memory usage and CPU time for initial loading, etc. ??? or should I just think of it, as an small object pointer.

(my object tree will in average contain about 100-300 objects).


I hope someone can help on this.


In fact your objects are not going to "contain" individual font instances, they are merely going to reference one. I believe the Font Manager will cache fonts it loads as needed so you don't have to worry about it. If you ask for a variation of a font, the FM will cache it and return the same instance again for an identical request from another object. In effect it's already implementing the "look up table" scheme you're considering.

In general, implement the simplest approach that solves your problem then, if necessary, optimise later.

--Graham


_______________________________________________

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