Specifications
63ADOBE FLEX 3
Building and Deploying Adobe Flex 3 Applications
4 Select High System Performance from the Power Schemes drop-down box.
5 Click OK.
Changing timeout length
When you test your application, be aware of the scriptTimeLimit property. If an application takes too long to
initialize, Flash Player warns users that a script is causing Flash Player to run slowly and prompts the user to abort
the application. If this is the situation, you can set the
scriptTimeLimit property of the <mx:Application> tag
to a longer time so that the Flex application has enough time to initialize.
However, the default value of the
scriptTimeLimit property is 60 seconds, which is also the maximum, so you
can only increase the value if you have previously set it to a lower value. You rarely need to change this value.
The following example sets the
scriptTimeLimit property to 30:
<?xml version="1.0"?>
<!-- optimize/ChangeScriptTimeLimit.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" scriptTimeLimit="30">
<!-- Empty application -->
</mx:Application>
Preventing client-side caching
When you test performance, ensure that you are not serving files from the local cache to Flash Player. Otherwise,
this can give false results about download times. Also, during development and testing, you might want to change
aspects of the application such as embedded images, but the browser continues to use the old images from your
cache.
If the date and time in the If-Modified-Since request header matches the date and time in the Last-Modified
response header, the browser loads the SWF file from its cache. Then the server returns the 304 Not Modified
message. If the Last-Modified header is more recent, the server returns the SWF file.
You can use the following techniques to disable client-side caching:
• Delete the Flex files from the browser’s cache after each interaction with your application. Browsers typically
store the SWF file and other remote assets in their cache. On Microsoft Internet Explorer in Windows XP, for
example, you can delete all the files in c:\Documents and Settings\username\Local Settings\Temporary Internet
Files to force a refresh of the files on the next request. For more information, see
“Caching” on page 36.
• Set the HTTP headers for the SWF file request in the HTML wrapper to prevent caching of the SWF file on
the client. The following example shows how to set headers that prevent caching in JSP:
// Set Cache-Control to no-cache.
response.setHeader("Cache-Control", "no-cache");
// Prevent proxy caching.
response.setHeader("Pragma", "no-cache");










