Profiling CPU in Flash and Flex Applications in IntelliJ IDEA
Hello guys! Just recently we’ve published an update to our Flash/Flex Profiler plugin that gives you a powerful and easy to use toolset for profiling of Flash-based applications in IntelliJ IDEA.
Let us give you a brief overview of what you can do with it.
Sure, the first thing to start with is installation. Nothing complex here—go to File menu, open Settings, then click Plugins and Browse repositories (if you’re on Mac OS, the path is slightly different—you should look in IntelliJ IDEA, then Preferences, Plugins, and then Browse repositories). After you’re there, find ActionScript Profiler and install it.
Let’s play with this extremely simple Flex component to set an example.
As you can see, it’s a rather heavy computation implemented in Task.calculateResult() method that is invoked 1000 times in a cycle from clickHandler() function that handles the mouse click.
To start the profiling we open context menu for the main class and click Profile:
Once the application is built and started, an empty Profiling window opens. Let’s tell profiler to start collecting CPU usage data by clicking Start CPU Profiling.
Now switch to our application, click Calculate and wait for resulting popup to appear. Then, we need to go back to IDE and click Stop CPU Profiling to compute the results—and here they are!
Invoked functions table shows the list of called functions, with child nodes representing points from which parent node was called:
We can easily compare timings by sorting the table by self time or cumulative time (just click column header for that).
Note: Edit source action is available for every item either via context menu or with F4 keyboard shortcut, so you can go to source code directly from profiling results.
Merged callees table at the bottom shows all the functions that were called (directly or indirectly) from the function selected in the upper table. You can sort this table as well to compare every detail and expand items to drill down through the call chains.
This concludes today’s post about CPU profiling. We hope you enjoyed it. In the next posts we are going to take a look at memory profiling capabilities and memory leaks hunting techniques. Please report any problems to the bug tracker. Stay tuned!
Plugin is compatible with IntelliJ IDEA 11.0 and 10.5. It was tested with 32-bit Flash Player 9, 10 and 11 on Windows (32- and 64-bit), Mac OS (32-bit and 64-bit) and Linux (32-bit).
Profile with pleasure!
Subscribe to Blog updates
Thanks, we've got you!
The What, Why, and How of JPA Buddy in IntelliJ IDEA
Master JPA entity management with JPA Buddy in IntelliJ IDEA! Our latest article shows you how to simplify your workflow and reduce boilerplate code.
The Best of IntelliJ IDEA’s HTTP Client
In today's fast-paced tech world, easy and efficient management of web services and APIs is crucial. That's where IntelliJ IDEA's HTTP Client steps in, turning complex HTTP requests into a walk in the park. The HTTP Client is a feature-rich, text-based tool in IntelliJ IDEA Ultimate. It seamlessl…
Import Postman Collections to the HTTP Client
We know that many of you use Postman collections and want to stay in the flow while working with them. This means staying inside IntelliJ IDEA and not switching to a different app. Great news! You can now effortlessly transform Postman collections into .http and use them in the HTTP Client …
What’s New in IntelliJ IDEA 2023.1 for Spring Developers
The IntelliJ IDEA 2023.1 release came packed with updates for Spring. This blog post will highlight the most noticeable changes, including full support for Lombok, a reworked Spring tool window, navigation for Spring Security rules, Spring Security 6 support, and more. Remember that these featur…