Accessibility

Table of Contents

Macromedia Flex Profiler: Identifying Performance Bottlenecks in ActionScript

What Does the ActionScript Profiler Do?

The ActionScript Profiler outputs performance data for ActionScript that executes in Flash Player. The report generator then tabulates the data in one of the following views:

  • Performance Snapshot Summary: This view summarizes all the functions that the Player executes during the profiling session. This summary page is the starting point of any performance analysis. It shows the number of calls, Cumulative time, and Self Time. Self-time is the amount of time a method takes to execute. Users can sort the data by Cumulative time or Self Time. They can navigate to the functions that perform poorly by clicking the names in the summary page.
  • Method-Level Statistics: This view shows only the statistics of a function that a user selects to execute in the Player during the profiling session. Similar to the Performance Snapshot Summary view, it shows number of calls, Cumulative time, and Self Time. This report also supports sorting; users can click function names to go to another Method-Level Statistics pages, or click the source filename to see the Source-Level Statistics page for the function.
  • MXML/ActionScript Source-Level Statistics: The ActionScript Source-Level Statistics page shows the statistics of a user-selected function executed in the Player during the profiling session. It shows number of calls and cumulative time on a line-by-line basis. In contrast, the MXML Source-Level Statistics view shows the execution time of all functions that appear within the <mx:Script> tags in all the MXML components on a line-by-line basis.
  • Frame-Based Performance Summary: This report summarizes the execution time of all functions executed between frame updates during the profiling session. It’s basically the same as the Performance Snapshot Summary view, but presents data from a frame-based perspective. It is most useful to those who use Macromedia Flash MX 2004 to develop components for Flex because the amount of ActionScript code in each frame can drastically affect the delay of frame updates. Knowing how to distribute code evenly among frames may not speed up the overall performance of the component, but it may improve component responsiveness and perceived performance.
  • Asynchronous Function Latencies: Many ActionScript developers know that some built-in ActionScript functions, primarily network function calls, are asynchronous. The player must execute the functions asynchronously so that it can update frames. In some cases, visual components may have to update the displayed data based on the results of remote function calls. It is always a good idea to know how much slowdown to expect before “blaming” ActionScript code for the display update. This view shows the latencies of all network function calls in milliseconds.

Applications that Macromedia Flex generates usually require communications with the server to retrieve data. But note that the ActionScript Profiler does not collect performance data for server-side code. It only collects performance data for client-side code running in Flash Player.