Skip to main content

Performance Problem with JRE 7u6 and 7u7

Please note these forums are being decommissioned and use the new and improved forums at
2 replies [Last post]
Joined: 2003-11-26

Has anyone noted a performance issue with Java SE 7u6 and Java SE 7u7?

I usually test my parser-generator VisualLangLab with every new Java release, and am finding that the program suffers a major performance degradation when run under Java SE 7u6 and 7u7.

The test consists of running VisualLangLab to parse all the source files of the JDK as described in A Java7 Grammar for VisualLangLab.

I will need to compare profiling data (from 7u5 and 7u6 runs) to pinpoint the problem, but am wondering if anyone else has also had performance issues with 7u6 and 7u7. The Java bug database does not seem to have any information on this.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-11-26

I have now traced this problem to the substring(int,int) and subSequence(int,int) methods in java.lang.String.

The performance of these functions in Java SE 7u7 and 7u6 is much poorer than in 7u5. I have posted a bug report (7197183) with more details. The bug is not yet available in the bug database, but should become visible in a day or two.

My testing was performed entirely on Linux (Ubuntu 12.04), but if anyone has had similar issues on other platforms please let me know.

Joined: 2012-09-13

A comparison of the code between 7u5 and 7u6 indicates the implementation is completely different. The contents are now copied on every substring operation!

The previous implementation used char[] with start and length indices. The char[] was shared with the created substring.