Re: Problems with NSPageController
Re: Problems with NSPageController
- Subject: Re: Problems with NSPageController
- From: Fritz Anderson <email@hidden>
- Date: Tue, 23 Jul 2013 14:00:36 -0500
On 22 Jul 2013, at 7:56 AM, Martin Percossi <email@hidden> wrote:
> 1. I have a layer-backed view as the content of a page within a
> NSPageController. Everything works fine, however, compared to a simple
> layer-backed, empty, (blue background via self.layer.backgroundColor)
> NSView, the swipe animation kicks in very late. It's as if the
> snapshot taken by the private code within NSPageController takes a
> long time to complete. Does anyone knows why this could be occurring?
> My "complicated" layer-backed view contains multiple layer-backed
> subviews with transparencies, shadows, etc. In addition, it uses
> drawRect: to draw gridlines. It should be noted that under normal
> operation (i.e. when not history-swiping), I'm getting frame rates
> between 40-60fps -- so the drawing and subview positioning is probably
> not the bottleneck.
"Probably not the bottleneck" is not an encouraging thing to hear. You should know where the bottleneck is, without having to assign probabilities. Use the Time Profiler instrument to get the real answer. It will usually surprise you.
If it really is a matter of compositing the page content, look hard at how much of it can be replaced with hosted CALayers, or replacing views and layers with drawing into their containers directly.
Having very large numbers of NSViews smells like a performance issue. You say that the view composites very quickly when it stands alone, but I'd expect pushing the composite through the transformations and effects of page turns to be much, much slower. But now I'm assigning probabilities, which I just said should be avoided.
If you get deep into the weeds of graphics performance, you might want to look into email@hidden.
I'm sorry I can't answer your other questions.
— F
_______________________________________________
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