Hi Paul,

On 2016-10-17 19:39, Paul Sandoz wrote:
Hi Claes,

This looks good.

Thanks!


Did you consider adding asserts to the package private constructor?

No, might be reasonable. Do you insist? :-)

/Claes


Paul.

On 17 Oct 2016, at 04:17, Claes Redestad <claes.redes...@oracle.com> wrote:

Hi,

one partial cause for startup regressions due to jigsaw is related to creating
URIs for the location of each module.

By providing a package-private constructor we can avoid the time to scan and
validate the URI, which takes a little time (executes ~80K bytecodes) but also
pushes various methods over compilation thresholds during early startup,
which more notably interferes with perceived startup.

http://cr.openjdk.java.net/~redestad/8168073/webrev.01/
https://bugs.openjdk.java.net/browse/JDK-8168073

Notes:

When looking at this I discovered that the existing methods in JavaNetAccess
is no longer in use, and keeping the initialization in URLClassLoader forces
added classloading and costly initialization no longer needed during normal
bootstrap. Moving JavaNetAccess to URI seems like the natural choice.

By exploiting the lazyness of URI.toString(), this patch also saves a few Kbs of
retained heap.

Thanks!

/Claes

Reply via email to