[10] RFR: 8176041: Optimize handling of comment lines in Properties$LineReader.readLine
Claes Redestad
claes.redestad at oracle.com
Wed Mar 1 15:34:17 UTC 2017
Hi,
the properties line reader has some relevance to startup, e.g.,
when reading the java.security file, and as more documentation
content has been added to this file it has been made apparent
that the handling of comment lines is inefficient due to treating
every character after a comment line marker ('#' or '!') as any
other character (writes it to an internal buffer etc) when a
fast-path consuming the rest of the line would do.
Bug: https://bugs.openjdk.java.net/browse/JDK-8176041
Webrev: http://cr.openjdk.java.net/~redestad/8176041/jdk.01
This cuts off ~1ms from startup on apps that read the
java.security property file, and while this is tailored to improve
performance in interpreted code during startup there's also a
reasonable speedup in JIT:ed code.
(As this is actually resolving an extremely small regression in
9 due to the java.security file having grown, it's likely too late
and minor to go into 9..)
Thanks!
/Claes
More information about the core-libs-dev
mailing list