On Thursday, July 19, 2012 7:24:02 PM UTC+5:30, mythz wrote:
> As you can imagine without being able to reproduce what's happening we
> can't tell you anything. Without which we have no idea you're actually
> doing an Apples to Apples comparison or have verified the results being
> correct. Are you deserializing the entire payload into an object for all
> serializers?
> If you don't want to send over the file, send over some code that
> generates the 22mb file using the same types with sample data.
> Note: There is a 1 time warmup cost for prepping the delegate caches which
> is avoided for subsequent runs which should be factored out.
> D.B
> Sent from my iPad
> On 19 Jul 2012, at 08:11, Sathyamurthy V <vbsat...@gmail.com> wrote:
> > We are trying to compare the performance of TypeSerializer to .Net BCL
> DatacontractSerializer and we are getting weird results. We have a
> requirement to serialize huge object model, send across the wire and
> deserialize back to object model. The serialized string in xml format comes
> to 22 MB. So you can assume the size of object model we are trying to
> serialize and deserialize. The object model has lot of nesting so the
> hierarchy goes several level deep. ok, now the results. The time is given
> in seconds for one serialization and one deserialization.
> > DataContractSerializer(using XMLDictionaryWriter's CreateBinaryWriter
> for writing the output):
> > Serialization : 00:00:01.2203660
> > Deserialization : 00:00:02.1886564 (using XMLDictionaryReader's
> CreateBinaryReader for reading )
> > DataContractSerializer(using XMLDictionaryWriter's Create Method for
> writing the output):
> > serialization: 00:00:01.8005400
> > Deserialization : 00:00:01.7435229 (using XMLDictionaryReader's Create
> Method for reading)
> > DataContractSerializer(using XMLWriter):
> > serialization : 00:00:01.7465238
> > Deserialization : 00:00:01.7225166 (using XMLReader for reading)
> > TypeSerializer
> > serialization : 00:00:02.4687404
> > Deserialization : 00:00:06.1278378
> > Based on this results it looks like DataContractSerializer is performing
> better here. Can you throw any light into this and suggest how to get the
> better performance with TypeSerializer? is there any know issue that
> TypeSerializer is slow is handling any type of objects? I was really hoping
> that TypeSerializer will help us improving the performance but disappointed
> with the results. The serialized file is huge so I'm not attaching here.