Home All Groups Group Topic Archive Search About

Serialization Performance

Author
8 Apr 2005 4:25 PM
ljlevend2
I've noticed that
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter can take a
very long time to Serialize and Deserialize a large array of classes that
implement ISerializable.  In my test sample the array that I'm serializing
contains 100,000 elements (which is similar to the array size in my real
app.) and the test class contains 10 Color properties that are serialized. 
On my system this array takes ~55 seconds to serialize and deserialize while
building the array only takes ~0.2 seconds.

Is there any way to improve the serialization performance in this situation?
Of course in my real app the classes being serialized would contain a
variety of serializable objects rather than just colors.

Thanks,
Lance

Author
8 Apr 2005 7:08 PM
Daniel Carbajal [MVP]
Well, I assume you are using .NET remoting with a TCP Channel, the option we
use is DCOM with our own serializator and this is very fast!

Cheers,

Daniel Carbajal
Microsoft MVP
Calgary-Canada

Show quoteHide quote
"ljlevend2" <ljlevend2@nospam.nospam> wrote in message
news:0E5F0469-7398-4C2B-AEC0-598F9CA816D6@microsoft.com...
> I've noticed that
> System.Runtime.Serialization.Formatters.Binary.BinaryFormatter can take a
> very long time to Serialize and Deserialize a large array of classes that
> implement ISerializable.  In my test sample the array that I'm serializing
> contains 100,000 elements (which is similar to the array size in my real
> app.) and the test class contains 10 Color properties that are serialized.
> On my system this array takes ~55 seconds to serialize and deserialize
while
> building the array only takes ~0.2 seconds.
>
> Is there any way to improve the serialization performance in this
situation?
>  Of course in my real app the classes being serialized would contain a
> variety of serializable objects rather than just colors.
>
> Thanks,
> Lance
>
Author
12 Apr 2005 3:44 AM
Peter Huang" [MSFT]
Hi

Did Daniel's suggestion help you?
If you still have any concern, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.