Our client/server app uses a NetDataContractSerializer
to serialize arbitrary Serializable
objects.
The output of BinaryFormatter
would be somewhat smaller, performance however isn't really better.
Now smaller representations are possible (e.g. the outputs of XmlSerializer
and DataContractSerializer
, Json, Protocol Buffers, Thrift, etc.), that also happen to serialize and deserialize much faster.
However, in order to use those I'd have to go to every single one of the Serializable
classes and add attributes and potentially change access levels of fields etc. Not only are these classes spread over many different internal projects, but our clients have their own dlls with Serializable
classes which would have to be modified. In other words, a major undertaking.
Is there any other performance improvement, and potential size reduction (other than gzipping etc.), possible for Serializable
objects?