Improve ZonedDateTime offset handling

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 19
    • Affects Version/s: None
    • Component/s: core-libs
    • None
    • b16

      ZoneOffset::getRules isn't cached, so use heavily relies on escape analysis to elide the allocation. This is fragile optimization-wise, and even when it works we do extra computation that slows things down.

      Adding an abstract ZoneId::getOffset(epochSecond) means that we can avoid querying ZoneOffset::getRules altogether, eliminating the risk we miss escape analysis. Such specialization also helps the ZoneRegion case.

            Assignee:
            Claes Redestad
            Reporter:
            Claes Redestad
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: