Dear colleagues, Please review the patch that replaces the lambdas with anonymous classes which solves the startup time regression as shown below.
I attached the Bytestacks flamegraphs for both original (regression) and fixed versions. The flamegraphs clearly show the lambdas were causing the performance issue. [bytestacks_flamegraphs.zip](https://github.com/openjdk/jdk/files/6870446/bytestacks_flamegraphs.zip) Although the proposed JDK-8270321 patch fixes the startup time (it might appear even better than it was before the regression was introduced, i.e. before JDK-8266310), it increases MaxRSS slightly compared to the version before JDK-8266310, which is shown in the below graphs.   I additionally include the heap objects histograms to show the change does not increase the total live objects size significantly with only 1000 bytes the total difference, namely 1116128 bytes in 25002 live objects after the proposed fix JDK-8270321 compared to 1115128 bytes in 24990 objects in the version with the original patch reverted (i.e. before JDK-8266310). [histograms.zip](https://github.com/openjdk/jdk/files/6870457/histograms.zip) ------------- Commit messages: - 8270321: Startup regressions in 18-b5 caused by JDK-8266310 Changes: https://git.openjdk.java.net/jdk/pull/4893/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4893&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8270321 Stats: 35 lines in 1 file changed: 17 ins; 3 del; 15 mod Patch: https://git.openjdk.java.net/jdk/pull/4893.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4893/head:pull/4893 PR: https://git.openjdk.java.net/jdk/pull/4893