jlink plugin experiment to improve jake startup time
Alan.Bateman at oracle.com
Tue Oct 6 12:22:01 UTC 2015
On 06/10/2015 12:38, Claes Redestad wrote:
> Alternatively, wouldn't it be possible for the plugin to modify the
> module-info.class directly?
Generating the classes at link time is about eliminating the need to
parse the module-info and reconstitute the module descriptors via the
builder API. This is the 82ms that is dominating the initialization, a
lot of it lambda related, some of it because we are starting out in the
interpreter and of course triggering class loading and compilation.
> In general I think improving startup by staving off the first use of
> lambda isn't very helpful except for trivial applications (which we
> often over-emphasize when testing startup), while moving module
> validation to link time seems more like a real gain.
I would hope that over time that the LF initialization can be improved
as the cost of first usage is currently very significant. With a link
step then we have the opportunity to generate lambda proxy classes at
link time so that could potentially help too.
That said, it is also important to not regress startup. If it's 50 or
100ms more than JDK 8 then someone running a short lived tool will
notice and complain.
More information about the jigsaw-dev