[ https://issues.apache.org/jira/browse/LOG4J2-1359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15931936#comment-15931936 ]
Ralph Goers commented on LOG4J2-1359: ------------------------------------- Here are the results of the benchmarks. Overall, it seems that most of the tests are a bit slower in Java 9. Serializing an Event that has an Exception is a LOT slower, which is probably a result of the performance regression I already reported. However, getting the location information takes about 1/3 the time it did in Java 7. I don't understand the results of the serialization tests though. Although it is understandable that building a log event without an exception would be much faster than building one without one, I would have expected that building a serialized log event with location information would be about the same as building an event without location information + the time to get the location information. Instead, in Java 9 it is showing as slightly faster than getting the event without location information. I am thinking there must be something wrong with the test. Java 7 {code} Benchmark Mode Samples Score Error Units o.a.l.l.p.j.Log4jLogEventBenchmark.createLogEventWithExceptionUsingBuilder avgt 5 147.173 ± 3.876 ns/op o.a.l.l.p.j.Log4jLogEventBenchmark.createLogEventWithoutException avgt 5 177.807 ± 18.619 ns/op o.a.l.l.p.j.Log4jLogEventBenchmark.createLogEventWithoutExceptionUsingBuilder avgt 5 146.371 ± 9.554 ns/op o.a.l.l.p.j.Log4jLogEventBenchmark.createSerializableLogEventProxyWithException avgt 5 18450.541 ± 380.800 ns/op o.a.l.l.p.j.Log4jLogEventBenchmark.createSerializableLogEventProxyWithoutException avgt 5 250.715 ± 8.624 ns/op o.a.l.l.p.j.Log4jLogEventBenchmark.createSerializableLogEventProxyWithoutExceptionWithLocation avgt 5 274.293 ± 35.927 ns/op o.a.l.l.p.j.Log4jLogEventBenchmark.getSourceLocationOfLogEvent avgt 5 19988.446 ± 1752.194 ns/op o.a.l.l.p.j.Log4jLogEventBenchmark.testBaseline avgt 5 0.391 ± 0.028 ns/op {code} Java 9 {code} Benchmark Mode Samples Score Error Units o.a.l.l.p.j.Log4jLogEventBenchmark.createLogEventWithExceptionUsingBuilder avgt 5 190.018 ± 28.264 ns/op o.a.l.l.p.j.Log4jLogEventBenchmark.createLogEventWithoutException avgt 5 228.393 ± 16.702 ns/op o.a.l.l.p.j.Log4jLogEventBenchmark.createLogEventWithoutExceptionUsingBuilder avgt 5 171.760 ± 26.799 ns/op o.a.l.l.p.j.Log4jLogEventBenchmark.createSerializableLogEventProxyWithException avgt 5 32257.972 ± 4868.261 ns/op o.a.l.l.p.j.Log4jLogEventBenchmark.createSerializableLogEventProxyWithoutException avgt 5 285.204 ± 20.197 ns/op o.a.l.l.p.j.Log4jLogEventBenchmark.createSerializableLogEventProxyWithoutExceptionWithLocation avgt 5 271.399 ± 28.883 ns/op o.a.l.l.p.j.Log4jLogEventBenchmark.getSourceLocationOfLogEvent avgt 5 6839.420 ± 1007.405 ns/op o.a.l.l.p.j.Log4jLogEventBenchmark.testBaseline avgt 5 0.402 ± 0.009 ns/op {code} > Add support for Java 9 StackWalker API in ReflectionUtil > -------------------------------------------------------- > > Key: LOG4J2-1359 > URL: https://issues.apache.org/jira/browse/LOG4J2-1359 > Project: Log4j 2 > Issue Type: Improvement > Components: API > Environment: Java 1.9+ > Reporter: Matt Sicker > Assignee: Ralph Goers > Labels: jdk9 > > [StackWalker|http://download.java.net/jdk9/docs/api/java/lang/StackWalker.html] > Based on the functional nature of this API, supporting it may require > compiling at least one class using javac 1.9 and reflectively loading it in > ReflectionUtil similar to how Spring supports newer JDK APIs. > Without support for StackWalker, ReflectionUtil will fall back to using a > slower API in Java 1.9. This is because the Reflection class is a > sun-internal class which are no longer exported to non-JDK code without > setting special command line flags. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org