You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Measures took 1 hour and 12 minutes. From Maven versions 3.2.5 to 3.6.2, heap allocation level is the highest with Maven 3.2.5 and the smallest with Maven 3.6.2. And __the heap allocation decreases from ~7 GB with Maven 3.6.1 to ~3 GB with Maven 3.6.2__.
84
+
Measures took around one hour and a quarter.
85
+
86
+
From Maven versions 3.2.5 to 3.6.2, heap allocation level is the highest with Maven 3.2.5 and the smallest with Maven 3.6.2. *The heap allocation decreases from ~7 GB with Maven 3.6.1 to ~3 GB with Maven 3.6.2*.
83
87
84
-
JVM heap size can be fixed with the help of [@HeapSize](https://github.com/quick-perf/doc/wiki/JVM-annotations#heapsize):
85
-
* with Maven 3.2.5 and a JVM heap size between 6 and 9 GB, one measure of heap allocation takes around one minute: the test duration is about 1.5 minute with a 5 GB heap size, probably due to more garbage collection,
86
-
*__with Maven 3.6.2, the test duration drops to 15 seconds for a heap size between 1 and 9 GB__
88
+
Control and reduce heap allocation is an important matter for Maven project. Indeed, a part of the heap allocation is going to be garbage collected and the garbage collection activity is succeptible to slow down your build. In addition, less heap allocation means that you may execute Maven with a smaller heap size.
87
89
88
-
Less heap allocation means you can allocate less memory, and given a memory allocation you get less garbage collection, then it takes less time: with QuickPerf, we were able to measure the improvement precisely.
90
+
But where the allocation comes from? In the following part we will see how to spot the Java methods allocating a lot.
89
91
90
92
# Investigate where heap allocation comes from
91
93
@@ -106,7 +108,7 @@ The recording file can be found here: C:\Users\JEANBI~1\AppData\Local\Temp\Quick
106
108
You can open it with Java Mission Control (JMC).
107
109
```
108
110
109
-
You can open it with Java Mission Control (JMC).
111
+
You can open it with Java Mission Control (JMC) to discover the methods contributing the most to heap allocation.
110
112
111
113
Below a JFR file for Maven 3.2.5 and opened with JMC 5.5:
0 commit comments