jdk.internal.module.Service.ServicesCatalog should use synchronized to improve the VM boot time
Remi Forax
forax at univ-mlv.fr
Thu Mar 17 10:37:46 UTC 2016
Hi all,
currently ServicesCatalog uses a R/W lock which is great if looking up for a service was a contended operation,
but i don't think it is. I will not care if ServicesCatalog was not used early in the boot process, but it is.
As far as i know, no other class uses a R/W lock during the boot process
(I may be wrong, i've checked only against the latest jdk8)
so i think that
- using synchronized here is good enough
- it will avoid to load a bunch of classes from java.util.concurrent.locks thus make the VM boot faster.
regards,
Rémi
More information about the jigsaw-dev
mailing list