<i18n dev> RFR: 8349000: Performance improvement for Currency.isPastCutoverDate(String)
Justin Lu
jlu at openjdk.org
Thu Jan 30 19:33:25 UTC 2025
Please review this PR which improves the performance of cut-over date checking when the user supplies a properties override via the `java.util.currency.data` sys prop. Replacing the `SimpleDateFormat` with a _java.time_ alternative has better performance. It should be noted that this method is only entered when the string `s` is confirmed to adhere to the format: `yyyy-MM-ddTHH:mm:ss`.
An alternative is using `LocalDateTime.of(..)` and extracting the date/time values ourselves from `s` with the known positions which is considerably faster but not as concise.
-------------
Commit messages:
- init
Changes: https://git.openjdk.org/jdk/pull/23374/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23374&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8349000
Stats: 14 lines in 1 file changed: 2 ins; 3 del; 9 mod
Patch: https://git.openjdk.org/jdk/pull/23374.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23374/head:pull/23374
PR: https://git.openjdk.org/jdk/pull/23374
More information about the i18n-dev
mailing list