maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Rosenvold <>
Subject A very interesting performance regression in 3.1 embedded mode
Date Sun, 09 Dec 2012 21:58:14 GMT
Now that 3.1 works with embedded mode again I have found an
/interesting/ performance regression;

In this commit;a=commit;h=451c43152b8939a699dfa5db4fc4ca8676182462
the plugin realm cache is purged after each embedded build. While this
obviously saves a ton of memory, it also means we have
to reload almost *everything* the next time, and each embedded
invocation got approximately 0,5 seconds slower, adding
a hefty 2.5 minutes to the embedded build-time of surefire (mvn
-Pembedded install in surefire) and probably the same for core.

Additionally the fix only clears DefaultPluginRealmCache and not

All in all it seems a little suboptimal; it seems like we could need a
slightly improved cache eviction strategy.
Without getting too advanced I can think of a least a couple of strategies:

A) Client driven. Let client release MavenCli instance every now and
then (and reallocate a new one) to free memory.
B) Cache eviction mechanism in DefaultPluginRealmCache and maybe
DefaultProjectRealmCache. Maybe ditch everything
    "every now and then" or half the plugins every 5 invocations or similar.

It would seem to me like running builds with extensions is eating a
*lot* of memory and permgen currently.

Anyone else have any ideas about eviction strategies ?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message