RFR8220166 : Performance regression in deserialization
Alan.Bateman at oracle.com
Thu May 16 09:43:57 UTC 2019
On 15/05/2019 21:32, Roger Riggs wrote:
> Please review a change in the synchronization during the creation of
> an ObjectInputStream.
> Currently, a synchronized block is used to initialize the streams
> filter is read the global serial filter
> which becomes a bottleneck under high concurrency. Since the value
> only ever changes from null to non-null
> once, the synchronization is not needed. Changing the field to
> volatile and removing
> the synchronization on read should alleviate the contention.
This looks okay. In passing, getSerialFilter's javadoc doesn't make
clear that it can return non-null when configured or set. The setter is
a bit clearer on this point.
More information about the core-libs-dev