Uploaded image for project: 'XBean'
  1. XBean
  2. XBEAN-274

Xbean finder is slow because of String.replaceFirst

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0
    • 4.1
    • finder
    • None

    Description

      JarArchive uses entry.getName().replaceFirst(".class$", "");

      This is effectively a replacement of the last ".class" in the entry name.
      This is pretty slow as replaceFirst internally creates a PatternMatcher.
      By replacing this line with an endsWith + substring I ended up with 20% performance boost.
      Overall in a real world application my OpenWebBeans boot time went down from 1020ms to 969ms.

      Attachments

        Activity

          People

            struberg Mark Struberg
            struberg Mark Struberg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: