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.


Regards

Gideon

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?

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to