maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [maven] gnodet commented on issue #261: [MNG-6697] New fast model interpolator not using reflection
Date Wed, 03 Jul 2019 06:50:17 GMT
gnodet commented on issue #261: [MNG-6697] New fast model interpolator not using reflection
   @Tibor17 The whole point of this PR is to actually provide a completely new implementation
of the `ModelInterpolator`, so that the `StringSearchModelInterpolator` would not be used
anymore and replace it with the new `StringVisitorModelInterpolator` which does not use reflection
at all.
   Fwiw, your assumption about the performance of the `toArray` seems wrong, see
for example.
   The performance of the ConcurrentHashMap are definitely very good, especially under concurrent
access compared to synchronizing on the HashMap, but for a single thread access, HashMap is
still a winner.
   Also, I haven't tried to blindy optimize things, but I did use a profile to find hot spots
that were using a lot of cpu and find ways to optimize it.  For the array case (which isn't
a problem anymore since we're not using reflection anymore with the new interpolator).  I
can provide the profiling data, but I don't think there is any array in the model, so the
`evaluateArray` is definitely not a major problem, would it take quite a long time compared
to a better implementation.
   I think, if there's a need to optimize things more, I think the next point to consider
is to optimize the `Xpp3Dom` because the initialization of those nodes amounts for 10% of
the time used in the `DefaultMaven.buildGraph` method in my usecase.  Given the information
given by the profiler, I can't see many other good optimization spots without making major
changes such as: avoid cloning the model by using immutable structures for plugins, dependencies
and xpp3dom, find a way to iterating through the whole hierarchy multiple times when building
the reactor projects in ``, etc... 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

View raw message