8170987: Module system implementation refresh (12/2016)

Claes Redestad claes.redestad at oracle.com
Thu Dec 15 14:13:05 UTC 2016


On 2016-12-15 10:17, Alan Bateman wrote:
>>
>> When we use —-module-version for user modules, the runtime will load
>> regex.  The system modules jlink plugin uses the cached version if
>> JDK modules to be compiled with —0module-version in the future.
>> This might be something we should look at in the future for performance.
> I'm sure Claes will be interested in that although I don't think we have
> any need to compile the JDK modules with --module-version, except maybe
> for testing exploded modules.

The context here, I assume, is the increased startup cost to initialize
java.util.regex in 9 (and a few regression fixes related to this that
I've done in the area which may have involved avoiding adding a
regex-free fast path for trivial but common cases):

The intent is and always has been to avoid introducing startup
regressions on small and maybe more importantly *existing* applications, 
be it just running java -version or tiny (jar-based)
tools which may have been optimized and tuned to start and run quickly
by having a minimal number of dependencies on JDK library classes.

In the grand scheme of things the startup and overheads of using
lambdas, regexes etc is tiny and will mostly be amortized by subsequent
use (and we're still finding ways to improve it even further), thus for
new use cases and features (such as --module-version) I think we can
and should use any and all features of the language if and when it
makes sense to do so.

Thanks!

/Claes


More information about the jigsaw-dev mailing list