Re: How to optimize image loading during core animation?

2011-02-18 Thread Sean Roehnelt
Image loading would be the first thing I would move into a background thread. Can you use GCD? It’s a perfect fit for such producer/consumer tasks. Please explain GCD. GCD would be ideal, and less complicated than the creating a thread most likely.It's even a quick read. Blocks

Re: How to optimize image loading during core animation?

2011-02-17 Thread Gabriel Zachmann
Thanks a lot for your response, Tomas! since no one replied so far, I’d take a try. I’m not much familiar with desktop Cocoa, but on iOS we have to be careful to keep longer actions from the main thread, since delays in the main thread block the UI. Isn’t this about the same issue? Good

Re: How to optimize image loading during core animation?

2011-02-17 Thread Laurent Daudelin
On Feb 17, 2011, at 09:15, Gabriel Zachmann wrote: Thanks a lot for your response, Tomas! since no one replied so far, I’d take a try. I’m not much familiar with desktop Cocoa, but on iOS we have to be careful to keep longer actions from the main thread, since delays in the main thread

Re: How to optimize image loading during core animation?

2011-02-17 Thread Shawn Erickson
You will want to decouple the image load and decode operation from the render side of things as much as you can. You can do that with threading, async loading, and/or operations/blocks. Basically you will want to load the image ahead of time before it is needed for any animation. Then while a

Re: How to optimize image loading during core animation?

2011-02-17 Thread Gabriel Zachmann
GCD is Grand Central Dispatch, Ah, the part of the kernel that deals with multiple cores, right? the brain that the OS uses to execute all running processes. You might want to read on that subject in the developer documentation. Definitely! In particular, since I haven't used

Re: How to optimize image loading during core animation?

2011-02-17 Thread Gabriel Zachmann
You will want to decouple the image load and decode operation from the render side of things as much as you can. The point is that on the render side there is actually very little work to be done. All I do in my code is to set up a new Core Animation layer every 10 seconds. So, will moving the

Re: How to optimize image loading during core animation?

2011-02-17 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2/17/11 5:22 PM, Gabriel Zachmann wrote: You will want to decouple the image load and decode operation from the render side of things as much as you can. The point is that on the render side there is actually very little work to be done.

How to optimize image loading during core animation?

2011-02-16 Thread Gabriel Zachmann
I am implementing a screensaver that is basically a photo show. The photos are animated using Core Animation (nothing complicated). The problem now is that when the screensaver switches to the next photo, the animation judders. The judder happens, as far as I can tell, only with large images,

Re: How to optimize image loading during core animation?

2011-02-16 Thread Tomáš Znamenáček
Hello, since no one replied so far, I’d take a try. I’m not much familiar with desktop Cocoa, but on iOS we have to be careful to keep longer actions from the main thread, since delays in the main thread block the UI. Isn’t this about the same issue? Image loading would be the first thing I