Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6952

Performance improvements for Strings.isEmpty

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 9.7.0
    • 10.0.0-M1, 9.8.0
    • wicket-core
    • None

    Description

      Strings.isEmpty is one of the most called methods in our application and consistently shows up as hot in our production profiler.

      Two simple performance optimizations can be tried:

      • Overload the method with a String parameter, to help the JIT compiler with it's decision to inline the method
      • Avoid calling String.trim if the first character isn't whitespace

      See https://github.com/apache/wicket/pull/497.

      Attachments

        Issue Links

          Activity

            People

              thomas.heigl Thomas Heigl
              thomas.heigl Thomas Heigl
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: