RFR: 8008733: Psr:perf:osb performance regression (18%) in wss_bodyenc
Aleksej Efimov
aleksej.efimov at oracle.com
Fri Oct 11 14:06:10 UTC 2013
Hi,
I need help in reviewing the fix for this one bug: 8008733. It was
firstly observed in JDK 6 and already fixed there.
The problem and the fix [1] looks trivial: There is a performance
regression in XPathContext class constructor and it's caused by double
initialization of 'm_dtmManager' field: one in the variable initializer
and another in the XPathContext constructor. The fix is to remove the
variable initializer.
I don't think we need a regression test for it, but we need to make sure
the regression is gone. In attempt to prove it, I have done two simple
hprof run [2] on a test app [3] that creates 100000 instances of
XPathContext in a cycle. And I've got the following results:
1. Without fix: The call count to
'com.sun.org.apache.xml.internal.dtm.DTMManager.newInstance' is 200000.
The average execution time was 20400 ms.
2. With fix: Call count = 100000. The average execution time = 15200 ms.
According to this data the performance regression is gone.
Thanks,
-Aleksej
[1] http://cr.openjdk.java.net/~aefimov/8008733/webrev.00/
[2] Without fix:
http://cr.openjdk.java.net/~aefimov/8008733/hprof_nofix.txt
With fix: http://cr.openjdk.java.net/~aefimov/8008733/hprof_withfix.txt
[3] http://cr.openjdk.java.net/~aefimov/8008733/XPathContextPerformance.java
More information about the core-libs-dev
mailing list