improve double converting by a pre-compiled regular expression

XMLWordPrintable

    • Type: Improvement
    • Resolution: Done
    • Priority: Normal
    • 5.7.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None

      Current Result

      org.zkoss.poi.ss.formula.eval.OperandResolver.fpRegex will be used for many times when converting a string to a double in a formula.

      Proposed improvement

      As Pattern javadoc recommends:

      If a pattern is to be used multiple times, compiling it once and reusing it will be more efficient than invoking this method each time.

      We should use a compiled one.

            Assignee:
            henrichen
            Reporter:
            hawk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: