While I was running the other day I had this crazy idea of making classworlds record the class loading sequence for each class realm and save the results somewhere. Next time the same realm is created we could have one or two threads that preemptively load all the same classes.
This is what I get for running 12km off-piste in the woods; the tempo is generally sufficiently low to let the crazy ideas creep in... Kristian 2013/8/8 Kristian Rosenvold <kristian.rosenv...@gmail.com>: > Not much :) In the test builds I'm measuring (entire builds, not just > core), class loading is 2-4% of > the build CPU time (with -DskipTests). I have not (yet) done any > empirical measurements > to determine how much of that we could actually save. The current > synchronzation in core > means this change in itself has very little effect for core (and also > no real danger > of breaking anything). > > But this also opens up for plugins to do parallel classloading, which > we have been effectively > blocking on jdk7. > > Core is after all pretty efficient, if we were to make any > *significant* performance improvements > in core we'd have to go for higher-level optimizations, which are > harder to find ;) > > Kristian > > > 2013/8/8 Jason van Zyl <ja...@tesla.io>: >> What the performance difference in loading classes in your stand-alone tests? >> >> On Aug 8, 2013, at 2:12 PM, Kristian Rosenvold >> <kristian.rosenv...@gmail.com> wrote: >> >>> I just committed an update to plexus-classworlds that permits >>> concurrent classloading under jdk7. >>> >>> I would really appreciate it if anyone would care to review this >>> patch, especially regarding thread safety (esp the use of guards >>> to access the protected methods of the base classes, which is where >>> the likely stuff might be). >>> >>> It's also possible to test this locally by building the snapshot >>> version from github and replacing the >>> plexus-classworlds-*.jar file in the "lib" folder of your maven >>> installation. You probably want to be running with the -T option >>> for a meaningful test. >>> >>> Dont expect significant gains until I am able to re-consider the >>> synchronization in maven core regarding plugin >>> construction, since that's pretty heavily synchronized atm. This is in >>> the famous pipeline, and this patch is step 1. >>> >>> So if anyone wants to study the details of the new jdk7 class loaders >>> and do a review at the same time, the >>> commit can be found here: >>> >>> https://github.com/sonatype/plexus-classworlds/commit/bc9583c4883b07adf9806b8323691aa5085c023e >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org >>> For additional commands, e-mail: dev-h...@maven.apache.org >>> >> >> Thanks, >> >> Jason >> >> ---------------------------------------------------------- >> Jason van Zyl >> Founder, Apache Maven >> http://twitter.com/jvanzyl >> --------------------------------------------------------- >> >> Script timed out >> >> >> >> >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org