Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8048443 | 8u25 | Stephen Colebourne | P4 | Resolved | Fixed | b05 |
JDK-8047374 | 8u20 | Stephen Colebourne | P4 | Resolved | Fixed | b20 |
JDK-8053699 | emb-8u26 | Stephen Colebourne | P4 | Resolved | Fixed | b17 |
In the java.time library three performance improvements can be noted:
1) In the Parsed class crossCheck() method, an exception is used for control flow. A typical parse containing an offset will trigger the exception throw/catch three times, slowing the parse.
2) In the from() method of ZonedDateTime and OffsetDateTime, exception throwing is used for control flow where an if statement would be more performant.
3) In the query() method of Instant and ZonedDateTime, the seven query types are not all handled, causing the slower default implementations to be called.
These are essentially bugs in the implementation. There is no externally observable change other than better performance.
1) In the Parsed class crossCheck() method, an exception is used for control flow. A typical parse containing an offset will trigger the exception throw/catch three times, slowing the parse.
2) In the from() method of ZonedDateTime and OffsetDateTime, exception throwing is used for control flow where an if statement would be more performant.
3) In the query() method of Instant and ZonedDateTime, the seven query types are not all handled, causing the slower default implementations to be called.
These are essentially bugs in the implementation. There is no externally observable change other than better performance.
- backported by
-
JDK-8047374 Performance of java.time could be better
-
- Resolved
-
-
JDK-8048443 Performance of java.time could be better
-
- Resolved
-
-
JDK-8053699 Performance of java.time could be better
-
- Resolved
-