Conerlius / protobuf-net

Automatically exported from code.google.com/p/protobuf-net
Other
0 stars 0 forks source link

serializing / deserializing collection is much slower with ProtoBuf-Net than with DatacontractSerializer. #272

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Please include an e-mail address if this might need a dialogue!
==============

What steps will reproduce the problem?
1. serialize / deserialize any collection with the standard API
2. e.g. ProtoBuf.Serializer.Serialize(stream, myCollection);
3.

What is the expected output? What do you see instead?
The size of serialized collections is smaller than DataContractSerializer and 
the content after deserialization is correct, but I would have expected at 
worst the same performance as the DatacontractSerializer.
however, protobuf-net is consistently slower. For example, with byte[256], I 
got 12 usec/12 usec for serializing/deserializing with Protobuf-net but 1.5 
usec / 3 usec with DataContractSerializer. 

What version of the product are you using? On what operating system?
version 2.0.0.480 on Widows 7 64-bits.

Please provide any additional information below.
Contact: louis.latour@gmail.com

Original issue reported on code.google.com by Louis.La...@gmail.com on 7 Feb 2012 at 1:33

Attachments:

GoogleCodeExporter commented 8 years ago
I suspect I know what this is, and there is a simple workaround, will check 
your sample in the morning

Original comment by marc.gravell on 7 Feb 2012 at 4:05