tags:

views:

123

answers:

4

We've got an app written in Flex that displays data from our app. The .swf file is only 427kb, but it takes a full five seconds to load in Firefox. This is a headache for our users because they need to access the page that contains the app frequently. (The app displays documents, and it's really slow to march through a list of them).

I've confirmed that it's not a slow web server problem. The .swf appears to be cached in the browser. Firebug reports that every time the web page accesses the .swf, the app server returns a "304 Not Modified" response, meaning that the load time from the server is almost zero.

Is there anything we can do to debug this issue? Or is the Flash player just slow?

A: 

Look at the creationPolicy documentation.. it may help..

The default should be "auto"... Creates all controls only in the initial view of the navigator container. This setting causes a faster startup time for the application, but results in slower response time for user navigation.

This setting is the default for multiple-view containers.

See if someone has changed your setting.

JohnFly
+3  A: 

If you're having issues with the time to download the SWF or to initialize the application, you could try breaking it up into modules and using the SWFLoader to only load the pieces as you need them. Flex applications are 2-frame movies, so the more you have in your application the more there is to initialize before it can start "playing."

If it's slow rendering everything, take a look at the creationPolicy and see if you're needlessly creating a hierarchy of items that aren't being displayed. Repeaters are also notorious for rendering slowly.

If your performance problems are more in-application, then you could consider profiling your application to see where the hotspots are.

Kaleb Pederson
+1  A: 

Have you tried running the app using the Flex Profiler? That may help you isolate any performance issues.

www.Flextras.com
+1  A: 

Consider checking out the Flex RSLs. These runtime shared libraries allow the Flash Player to cache the Flex framework and after the first load allow for a much faster startup time.

martineno
+1. for further reading, you should also check: http://ted.onflash.org/2008/01/flex-3-framework-caching.php
back2dos
He stated that he already checked browser caches and the sort. The load time from the server--once cached--was effectively zero. RSLs will help make his SWF smaller, but they won't solve his issue; which appears to be initialization.
www.Flextras.com
Jeffry, you are entirely correct. My bad for not reading the question more carefully.
martineno