-
Bug
-
Resolution: Fixed
-
P4
-
10
There's a small startup cost associated with private static final ObjectStreamField[] serialPersistentFields, most of which boils down to the fact that the constructor creates and interns a String corresponding to the field's class signature. By making this process lazy we can achieve a small startup gain on a variety of applications.
The most straightforward way of safely doing this lazily would involve making the final signature field lazy, which could have negative performance implications - but analysis shows that the signature field itself is not read during hot paths in serialization (only during one-off setup steps), so this should have no measurable impact on overall serialization performance.
The most straightforward way of safely doing this lazily would involve making the final signature field lazy, which could have negative performance implications - but analysis shows that the signature field itself is not read during hot paths in serialization (only during one-off setup steps), so this should have no measurable impact on overall serialization performance.