RFR 8066397 Remove network-related seed initialization code in ThreadLocal/SplittableRandom

Alan Bateman Alan.Bateman at oracle.com
Tue Dec 2 10:10:14 UTC 2014

On 02/12/2014 10:02, Paul Sandoz wrote:
> Hi,
> Please find below a patch to remove the networking code computing a seed in ThreadLocal/SplittableRandom.
> We thought it a good idea at the time :-) but subsequently on certain platforms this results in very high initalization costs that can propagate to other classes such as ConcurrentSkipList*.
> The short-term solution is to remove this code and fallback just using current system time. This needs to be back-ported to 8u40.
> A longer term solution is to provide a simple public API to get access to some seed bytes that is optimal for the underlying platform, for example, based on Peter's investigations. For linux /dev/urandom is sufficient as a source of bytes. The main problem seems to be Windows. It would also be nice to back-port to say 8u60 using a private API and update TLR/SR.
> Paul.
The approach seems pragmatic and the change looks okay to me (you might 
have some unused imports to removed too).


More information about the core-libs-dev mailing list