Java / Java Serialization
How do I improve Serialization performance?
The serialization process performance heavily depends on the number and size of attributes of the object to be serialized. Below are some tips to speed up the marshaling and un-marshaling of objects during Java serialization process.
- Mark the unnecessary or non Serializable attributes as transient. Eliminate unwanted properties to be serialized. Save only the state of the object, not the derived attributes.
- Serialize attributes only with NON-default values.
- Use Externalizable interface and implement the readExternal and writeExternal methods to dynamically identify the attributes to be serialized.
More Related questions...