On 26 Sep 2012, at 02:08, Aki Inoue <a...@apple.com> wrote: > >> 2. I thought the core text route would be more efficient. I have cached my >> CTLineRefs. Doesn't -drawWithRect:options:attributes: require instantiating >> an NSLayoutManager on each call? > We don't instantiate NSLayoutManager on each call. In some cases, caching > CTLine could be more efficient. In other cases, using NSStringDrawing > methods are more efficient. > > You should sample with your particular app before making the decision.
In my use case scenario on OS X 10.8 the cached CTLine approach is an order of magnitude faster than using the NSStringDrawing methods. Thanks for your input. It helped a lot. Regards Jonathan Mitchell Mugginsoft LLP ================================================ KosmicTask - the Integrated Scripting Environment for OS X. http://www.mugginsoft.com/KosmicTask ================================================ _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com