RFE: SimpleDateFormat performance improvement

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • 1.4.0
    • Affects Version/s: 1.4.0
    • Component/s: core-libs
    • None
    • beta2
    • generic
    • generic

      There are a couple of things for improving SimpleDateFormat performance.

      The 4326988 fix requires to scan the given pattern string to verify it. It's possible to compile a pattern string with a little extra of cpu cycles so that further scans (e.g., counting 'y's) of the same pattern in format() and parse().

      SimpleDateFormat.format() invokes DecimalFormat to format numbers, such as a year number, in a locale-dependent way. However, numbers to be formatted are usually in 1, 2 or 4 digits. Some optimization can be done.

            Assignee:
            Masayoshi Okutsu
            Reporter:
            Masayoshi Okutsu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: