Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8304976

Optimize DateTimeFormatterBuilder.ZoneTextPrinterParser.getTree()

    XMLWordPrintable

Details

    • b16

    Backports

      Description

        1) When DateTimeFormatter is reused we don't need to copy availableZoneIds and allocate nonRegionIds as PrefixTree can be taken from cache. In the related benchmark allocation of HashSet takes ~93% of all time, so avoiding it should bring some improvement for cases when we reuse DateTimeFormatter to parse a string into ZoneDateTime.

        2) DateTimeFormatter is mostly used with one locale, so cachedTree and cachedTreeCI can have predefined size.

        Attachments

          Issue Links

            Activity

              People

                stsypanov Sergey Tsypanov
                stsypanov Sergey Tsypanov
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: