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
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
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
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
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
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
-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.
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,
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