You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Andrzej Jarmoniuk (Jira)" <ji...@apache.org> on 2023/01/02 09:07:00 UTC

[jira] [Created] (MNG-7659) ComparableVersion

Andrzej Jarmoniuk created MNG-7659:
--------------------------------------

             Summary: ComparableVersion 
                 Key: MNG-7659
                 URL: https://issues.apache.org/jira/browse/MNG-7659
             Project: Maven
          Issue Type: Improvement
            Reporter: Andrzej Jarmoniuk


Tobias Gruetzmacher has raised an issue with Versions Maven Plugin - [Performance issue with many versions/artifacts #869|https://github.com/mojohaus/versions/issues/869], where he points out that we're creating lots of ComparableVersion objects (which happens especially during ArtifactVersion comparison), which affects performance. He proposed creating a simple cache for these objects.

This proved to increase performance in some Versions Maven Plugin jobs almost twofold.

What do you guys think of introducing this to Maven? 

The cache should probably be restricted in size (e.g. use LRUMap from commons collections), so that it won't leak memory when used with mvnd.

Simple implementation is here: https://github.com/mojohaus/versions/pull/870

Using LRUMap: https://github.com/mojohaus/versions/pull/893

The cache could alternatively be owned by DefaultArtifactVersion, where the construction of ComparableVersion is taking place. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)