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

Speed up DateTime parse & format via Class File API

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • 25
    • None
    • core-libs

      By using the Class File API to dynamically generate a CompositePrinterParser.

      Since the CompositePrinterParser is generated based on the pattern, we can make the following optimizations:

      For example, for the parse and print of Month/DayOfMonth/Hour/Minute/Second with a fixed length of 2, do targeted parse and print optimization.

      Parse uses LocalDate/LocalTime/LocalDateTime/OffsetDateTime for TemporalQuery to avoid the overhead of constructing DateTimeParseContext.

      These optimizations can significantly improve performance, with more than 100% performance improvement in many scenarios.

            swen Shaojin Wen
            swen Shaojin Wen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: