Re: Smooth scrolling in NSScrollView
Re: Smooth scrolling in NSScrollView
- Subject: Re: Smooth scrolling in NSScrollView
- From: Keary Suska <email@hidden>
- Date: Fri, 15 Oct 2010 09:09:02 -0600
On Oct 15, 2010, at 8:50 AM, Gideon King wrote:
> Thanks for the suggestion Uli.
>
> The subviews are layer backed views. I've stripped them down to simply drawing the color into a path - absolutely nothing unusual or complex there.
>
> Now this is rather embarrassing, but I found out that the cause of the visual slowdown was entirely due to running in the debugger. For some reason, it switches between the program and something else (presumably the debugger) at exactly that point in the program the first time the views are displayed.
>
> But I also found that the subviews are getting redrawn whenever the scroll is done and that view is on the screen. So in my animation, it redraws every frame. This is rather disturbing since I would have expected the layer to cache the image of the view and for that to be used when scrolling. If anyone can shed light on that, it'd be greatly appreciated.
What is the NSClipView's -copiesOnScroll value?
> On 15/10/2010, at 8:13 PM, Uli Kusterer wrote:
>
>>
>> Have you run the profiler (Shark/Instruments)? That may give some clues regarding what is causing the slowdown. "deduction" is rarely a good choice when trying to optimize code.
>>
>> Also, what kinds of views are in your scroll view? Are those standard system views (and if yes, which ones and with what content), or custom views of your own? Have you checked whether you are doing any unnecessarily repeated drawing that you could be cacheing to speed up the views, or display of a table view or whatever?
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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