[ 
https://issues.apache.org/jira/browse/MNG-6575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16767477#comment-16767477
 ] 
Robert Scholte commented on MNG-6575:
-------------------------------------

I would like to see an improvement in 
[Modello|https://github.com/codehaus-plexus/modello]. What I would like to see 
is that every model-class cab get a Builder innerclass. This will have several 
advantages:
- ability to create a cache for that model-class
- verify that all required values are indeed set.
We need to keep the setters to stay backwards compatible, but it shouldn't 
change effect the cache and that is probably the most difficult part to solve.

> make Dependency immutable
> -------------------------
>
>                 Key: MNG-6575
>                 URL: https://issues.apache.org/jira/browse/MNG-6575
>             Project: Maven
>          Issue Type: Improvement
>          Components: Dependencies, Inheritance and Interpolation
>    Affects Versions: 3.6.0
>            Reporter: Hervé Boutemy
>            Priority: Major
>         Attachments: dump-with-mng-6571-fixes.png, 
> dump-with-wrapper-approach.png
>
>
> while working on Maven memory consumption issue MNG-6571, once VersionRange 
> is made immutable, memory used was divided by 2: the next big expected win is 
> to make Dependency immutable, which would probably once again divide memory 
> by 2 because the vast majority of time, dependencies (be it in 
> dependencyManagement or base dependencies) are inherited without any 
> modification
> this will require to change 
> [ModelMerger|https://maven.apache.org/ref/3.6.0/maven-model/apidocs/org/apache/maven/model/merge/ModelMerger.html]
>  's {{mergeDependency(Dependency target, Dependency source, boolean 
> sourceDominant, Map<Object,Object> context)}} signature, since is not really 
> an immutable friendly signature
> and also make [Dependency 
> code|https://maven.apache.org/ref/3.6.0/maven-model/apidocs/org/apache/maven/model/Dependency.html]
>  immutable (generated by Modello)



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

Reply via email to