• 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: Reordering CALayer sublayers without raping my performance?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reordering CALayer sublayers without raping my performance?


  • Subject: Re: Reordering CALayer sublayers without raping my performance?
  • From: Jonathan del Strother <email@hidden>
  • Date: Fri, 16 Nov 2007 18:54:29 +0000


On 16 Nov 2007, at 18:48, David Duncan wrote:

On Nov 16, 2007, at 10:41 AM, Jonathan del Strother wrote:

I have a root CALayer with around 250 child layers. Only 50 or so are visible at a time, the rest have their opacity set to 0 (which I've found to be far more performant that continuously removing and adding child layers).

Every 0.2 seconds, I want to move one of these child layers to be drawn on the top of everything else. I'm doing this by altering the order of the root layer's sub layers. I haven't been able to find an acceptable way of doing this. Everything I've tried will continuously increase my virtual memory usage to ~3.5GB, before dropping back to 1.1GB every 10 seconds or so. While that drop happens, my application performance drops massively, displaying a frame a second at best, on a Mac Pro with 3GB RAM.


Use the zPosition property. All layers with a larger zPosition will be placed in front of those with a smaller one. The default value is 0.

Hmm, you're right.

Am I misreading this, or does the "Layer Geometry and Transforms" page tell me something completely different :
"The zPosition is intended to be used to set the visual position of the layer relative to its sibling layers. It should not be used to specify the order of layer siblings, instead reorder the layer in the sublayer array."
_______________________________________________


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: Reordering CALayer sublayers without raping my performance?
      • From: David Duncan <email@hidden>
References: 
 >Reordering CALayer sublayers without raping my performance? (From: Jonathan del Strother <email@hidden>)
 >Re: Reordering CALayer sublayers without raping my performance? (From: David Duncan <email@hidden>)

  • Prev by Date: Re: Reordering CALayer sublayers without raping my performance?
  • Next by Date: disable quick look server for files
  • Previous by thread: Re: Reordering CALayer sublayers without raping my performance?
  • Next by thread: Re: Reordering CALayer sublayers without raping my performance?
  • Index(es):
    • Date
    • Thread