Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue with many versions/artifacts #869

Closed
TobiX opened this issue Dec 20, 2022 · 0 comments · Fixed by #870
Closed

Performance issue with many versions/artifacts #869

TobiX opened this issue Dec 20, 2022 · 0 comments · Fixed by #870
Milestone

Comments

@TobiX
Copy link
Contributor

TobiX commented Dec 20, 2022

Creating update reports with many potential update versions & artefacts is pretty slow. As an example take this pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>test</groupId>
  <artifactId>test</artifactId>
  <version>1-SNAPSHOT</version>
  <packaging>pom</packaging>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <awssdk.version>2.13.26</awssdk.version>
    <!-- awssdk.version>2.17.290</awssdk.version -->
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>bom</artifactId>
        <version>${awssdk.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.12.1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>2.14.1</version>
          <configuration>
            <formats>
              <format>html</format>
              <format>xml</format>
            </formats>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <reporting>
    <excludeDefaults>true</excludeDefaults>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </reporting>
</project>

This uses a fairly outdated version of the AWS SDK bom. This bom contains a lot of modules, which all individually are checked for newer versions. This takes ages.

It seems that most time is spent somewhere in ComparableVersion, mostly because of BigInteger.toString:
grafik
So I wonder if caching ComparableVersion instances would do the trick...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants