• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Drawing to two CALayers at once (or pretend to)?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Drawing to two CALayers at once (or pretend to)?


  • Subject: Re: Drawing to two CALayers at once (or pretend to)?
  • From: Seth Willits <email@hidden>
  • Date: Mon, 27 Dec 2010 14:12:13 -0800

On Dec 27, 2010, at 12:59 PM, vincent habchi wrote:

>>> Knowing that the path is computed by reading values in a database, I'd like to avoid a double reading that costs some time (even if there is a cache) and seems redundant
>>
>> Ancient precept: Make it right, then make it fast. Do it the simplest reasonable way, even if you can imagine a "more efficient" way to do it. Then measure.
>
> You're absolutely right. My concern was that the cache might not be sufficient to hold all data because DB traffic can be pretty high. But, first of all, I must write out this routine to put the text along the paths, and that isn't going to be easy.


That, but I also don't see why the two layers would need to read the data separately. For example, their delegate can be the one to fetch and read the data and create the path from it, then save that CG path. When either layer draws, it would simply use that path. It'd be trivial.


--
Seth Willits



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Drawing to two CALayers at once (or pretend to)?
      • From: vincent habchi <email@hidden>
References: 
 >Drawing to two CALayers at once (or pretend to)? (From: vincent habchi <email@hidden>)
 >Re: Drawing to two CALayers at once (or pretend to)? (From: Fritz Anderson <email@hidden>)
 >Re: Drawing to two CALayers at once (or pretend to)? (From: vincent habchi <email@hidden>)

  • Prev by Date: Re: Drawing to two CALayers at once (or pretend to)?
  • Next by Date: Re: Drawing to two CALayers at once (or pretend to)?
  • Previous by thread: Re: Drawing to two CALayers at once (or pretend to)?
  • Next by thread: Re: Drawing to two CALayers at once (or pretend to)?
  • Index(es):
    • Date
    • Thread