DataSets and Serialization

We all know DataSets are not good when you want to serialize them, because they always are serialized as XML + the XML-Schema even if you are using a binary formatter. This implies you get a big serialization payload and bad serialization performance each time you transfer a DataSet using Remoting or when you store a DataSet in a ASP.NET session variable, just to mention two common scenarios.

I decided to check if that could be fixed, so we could give more value added to our DeKlarit customers, and it was really easy to fix.

I was able to reduce serialization times to about a 13%, deserialization times to about a 20% and serialization size about a 15%, when using the binary formatter.

More interesting, depending on the number of rows that were serialized, these numbers are similar to the ones you get when serializing a plain object array (i.e. Customer[]), and sometimes even better!

Read the details here.

No Comments