You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2019/04/04 23:14:02 UTC

[jira] [Commented] (MNG-6572) use int or long instead of BigIntegers for little numbers in ComparableVersion

    [ https://issues.apache.org/jira/browse/MNG-6572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16810391#comment-16810391 ] 

Hudson commented on MNG-6572:
-----------------------------

Build unstable in Jenkins: Maven TLP » maven » MNG-6169/MNG-6556 #12

See https://builds.apache.org/job/maven-box/job/maven/job/MNG-6169%252FMNG-6556/12/

> use int or long instead of BigIntegers for little numbers in ComparableVersion
> ------------------------------------------------------------------------------
>
>                 Key: MNG-6572
>                 URL: https://issues.apache.org/jira/browse/MNG-6572
>             Project: Maven
>          Issue Type: Improvement
>          Components: Artifacts and Repositories, Performance
>    Affects Versions: 3.6.0
>            Reporter: Hervé Boutemy
>            Assignee: Hervé Boutemy
>            Priority: Major
>              Labels: up-for-grabs
>             Fix For: 3.6.1
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> while working on MNG-6571, we found that this could enhance performance when many versions are compared: perhaps not in Maven builds, since this is probably negligible, but in other scenario where version comparison is used, this could be useful
> see https://github.com/apache/maven/blob/master/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/ComparableVersion.java
> for every Integer, a BigInteger is currently used
> but for integer that have less than 10 digits, an int would be sufficient and would be a lot more efficient
> and for integers that are less than 19 digits, a long would be the way to go
> the biggest numbers we get usually is the timestamp of a SNAPSHOT, like {{20171015.230843}} (YYYYMMDD.HHmmss), then an int will be sufficient in the vast majority of case



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)