Uploaded image for project: 'Maven Shared Components'
  1. Maven Shared Components
  2. MSHARED-307

Performance: The implementation of DefaultClassAnalyzer unnecessarily scans jar files bodies

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      The contract of the method is to provide a list of classes given a URL. In case of JAR files it would be enough to use JarFile#entries. However, since the implementation delegates to ClassFileVisitorUtils using an implementation of the visitor, the JAR files are being read completely, including the streams of the individual classes.
      This is a considerable performance hit. Specifically, in our project we have vast amount of Maven modules and do a dependency validation for them. By replacing the current implementation with one that uses JarFile#getEntries we were able to reduce the build time by 4 minutes.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            olamy Olivier Lamy
            victorbr Victor Bronstein
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment