RFR: 8175385: ServiceLoader$LazyClassPathLookupIterator scans boot and platform modules for services

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

RFR: 8175385: ServiceLoader$LazyClassPathLookupIterator scans boot and platform modules for services

Claes Redestad
Hi,

related to the same regression as JDK-8175561, there are now some cases
where we unnecessarily scan platform modules for services.  This patch
allows us to skip the platform and boot classloaders in certain cases,
which speeds up loading and enumerating the built-in services.

Bug: https://bugs.openjdk.java.net/browse/JDK-8175561
Webrev: http://cr.openjdk.java.net/~redestad/8175385/jdk.01/

Thanks!

/Claes
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8175385: ServiceLoader$LazyClassPathLookupIterator scans boot and platform modules for services

Mandy Chung

> On Feb 23, 2017, at 3:19 PM, Claes Redestad <[hidden email]> wrote:
>
> Hi,
>
> related to the same regression as JDK-8175561, there are now some cases
> where we unnecessarily scan platform modules for services.  This patch
> allows us to skip the platform and boot classloaders in certain cases,
> which speeds up loading and enumerating the built-in services.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8175561
> Webrev: http://cr.openjdk.java.net/~redestad/8175385/jdk.01/

Looks good to me.

Mandy
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8175385: ServiceLoader$LazyClassPathLookupIterator scans boot and platform modules for services

Alan Bateman
In reply to this post by Claes Redestad


On 23/02/2017 23:19, Claes Redestad wrote:
> Hi,
>
> related to the same regression as JDK-8175561, there are now some cases
> where we unnecessarily scan platform modules for services.  This patch
> allows us to skip the platform and boot classloaders in certain cases,
> which speeds up loading and enumerating the built-in services.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8175561
> Webrev: http://cr.openjdk.java.net/~redestad/8175385/jdk.01/
Looks good. A minor nit is to move BootLoader hasClassPath() so it's
co-located with the other public static methods.

-Alan
Reply | Threaded
Open this post in threaded view
|

Re: RFR: 8175385: ServiceLoader$LazyClassPathLookupIterator scans boot and platform modules for services

Claes Redestad


On 02/24/2017 09:50 AM, Alan Bateman wrote:

>
>
> On 23/02/2017 23:19, Claes Redestad wrote:
>> Hi,
>>
>> related to the same regression as JDK-8175561, there are now some cases
>> where we unnecessarily scan platform modules for services.  This patch
>> allows us to skip the platform and boot classloaders in certain cases,
>> which speeds up loading and enumerating the built-in services.
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8175561
>> Webrev: http://cr.openjdk.java.net/~redestad/8175385/jdk.01/
> Looks good.

Thanks!

> A minor nit is to move BootLoader hasClassPath() so it's co-located
> with the other public static methods.

Moved it up to just after packages() (updated in-place).

/Claes

>
> -Alan