RFR: 8247532: Records deserialization is slow

Peter Levart peter.levart at gmail.com
Sun Jun 21 07:27:58 UTC 2020


On 6/17/20 4:47 PM, forax at univ-mlv.fr wrote:
> ----- Mail original -----
>> De: "Peter Levart" <peter.levart at gmail.com>
>> ... TLDR;
>> So for each record type
>> (Class<? extends Record>) there can be several distinct
>> ObjectStreamClasses deserialized in the same VM that were produced by
>> serializing different versions of record types in different VMs...
> Ok, i see, you want to cache all permutations not only the one corresponding to the current record order.
>
> Rémi


Right. So while the most prevalent shape of stream will be the one that 
is produced by the same version of class as is currently used in the 
local VM, there can be situations where this is not true. For example, 
you upgrade some service with new version of class, but want to support 
older clients as well as new. If older clients suddenly experienced a 
drop of deserialization performance, it would not be nice.


Regards, Peter


>>
>> On 6/17/20 1:06 AM, Remi Forax wrote:
>>> Hi Peter,
>>> is their a reason to not use a ClassValue<MethodHandle> using the record class
>>> as key instead of the more complex keys you are proposing ?
>>>
>>> Rémi


More information about the core-libs-dev mailing list