JDK-8224202 : Speed up Properties.load
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 11,13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-05-20
  • Updated: 2019-10-04
  • Resolved: 2019-05-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13
11.0.5-oracleFixed 13 b23Fixed
Description
JDK-8176041 sped up parsing of comment lines, but was a bit too conservative and can be improved upon a bit:

- it breaks the fast path loop on backslashes, even though a backslash embedded in a comment line will never have any effect on subsequent logical lines
- it does two comparisons in the common case: testing c <= '\r' && c >= '\n' would mean only one comparison in the common case, since c is very likely to be > '\r' (also when reading from a byte stream)

While generally applicable, these optimizations speed up read of java.security by another ~10%, which has some relevance to bootstrap time on certain applications.
Comments
Fix Request (11u) Backporting this patch provides startup improvements and keeps codebases in sync (I see 11.0.5-oracle). Patch applies to 11u, but does not compile, requires adjustments. Patched JDK passes tier1. 11u RFR: https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2019-August/001601.html
07-08-2019