-
Enhancement
-
Resolution: Fixed
-
P4
-
None
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8084831 | emb-9 | Peter Levart | P4 | Resolved | Fixed | team |
There is a loop over ZoneOffsetTransition[] array that searches for 1st transition that has its toEpochSecond value less than the Instant's epochSecond. This calls ZoneOffsetTransition.toEpochSecond repeatedly, converting ZoneOffsetTransition.transition which is a LocalDateTime to epochSecond. This repeated conversion is unnecessary, as ZoneOffsetTransition[] array is part of ZoneRules which is cached. The simplest form of optimization is for the ZoneOffsetTransition implementation to keep both LocalDateTime variant and epochSecond variant of transition time as the object's state.
- backported by
-
JDK-8084831 java.time.zone.ZoneRules.getOffset(java.time.Instant) can be optimized
-
- Resolved
-
- relates to
-
JDK-8079063 ZoneOffsetTransitionRule.of should throw IAE for non-zero nanoseconds
-
- Resolved
-