/customers/iconara.net/iconara.net/httpd.www/blog/wp-content/plugins/wp-super-cache/wp-cache-phase1.php Iconara » Optimising concurrent loading and animation

Optimising concurrent loading and animation

I’ve spent the whole of monday optimising loading and animation on a website I’m working on. I realise now that I had been a little too naïve when it came to multitasking, which the Flash player is not very good at, because my animations became slow and jerky when I loaded things in the background.

The site has no loading sequences, instead I try to load the needed resources when they are needed, more like a HTML website. I belive that this makes for a better user experience. It requires some thinking on when to load what, because once you have started loading, the user may change their mind and you have to start load something else, but you can’t do that before the loaders you just started have finished. However, with a little prioritisation and centralised control it can be done.

But there seems to be one more problem, if you load something and try to run an animation at the same time, it looks really bad. The animation slows down and skips frames. I guess that this has to do with the Flash player being single-threaded. In my mind, throwing away an asynchronous request leaves you free to do some animation until the response comes, but it doesn’t work that way.

I the end I solved the problem by letting my components request that all loading should be blocked when they start an animation. When the animation is finished the component has to tell the central loading queue to continue. I believe its an acceptable solution, but I would have wished for a better one.

Does anyone have a suggestion for how to deal with concurrent loading and animation besides throwing up a sign that says “loading”?

One Response to “Optimising concurrent loading and animation”

  1. JesterXL Says:

    No, that’s really all you can do. - load animation - next frame, load data

    What is it that you are loading that is hitting the processor so hard?

Leave a Reply