IntelliJ IDEA
 
Get IntelliJ IDEA
You are viewing the documentation for an earlier version of IntelliJ IDEA.

Compare profiler snapshots

Last modified: 26 June 2023

IntelliJ IDEA allows you to compare profiler snapshots. This may be useful to see how a certain change in the code affects performance, or how the same piece of code performs in different runtimes.

For comparison, you can use the flame graph, the call tree, or the method list. In comparison mode, the tabs offer their regular functionality while additionally showing how the two snapshots differ in terms of each entry (for example, a tree node or a method list item).

Method List tab in the comparison mode

Let's look at the flame graph.

Flame graph in the comparison mode

If you see that half of the frame is green, it means that there were roughly 50% less samples with such state in the second snapshot. If an entire frame is green, it was not even present in the second snapshot. The red color means the opposite.

For example, the following part of the graph tells us that the main() method became 49.1% faster after the changes, and that this was mainly possible by reducing the time that the program spends in ArrayList.remove().

Hovering over a frame in the flame graph provides comparison details