简体   繁体   中英

How to get Flex app to load quicker?

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?

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.

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

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM