tag:blogger.com,1999:blog-5492774.post6127577349383511080..comments2016-09-08T07:51:16.371-04:00Comments on Andrew MacNeill - AKSEL Solutions: Joys of XML SerializationAndrew MacNeillnoreply@blogger.comBlogger3125tag:blogger.com,1999:blog-5492774.post-90520274489252205922011-01-01T04:56:00.156-05:002011-01-01T04:56:00.156-05:00Hi Brian,
The only issue right now is that I don&...Hi Brian,<br /><br />The only issue right now is that I don&#39;t control the other applications accessing the data so they are expecting XML.<br /><br />However, I&#39;ll add JSON as an alternate export and see if it improves performance.<br /><br />Great idea - thanks!Andrew MacNeillhttp://www.blogger.com/profile/03888444225785506598noreply@blogger.comtag:blogger.com,1999:blog-5492774.post-66066810460319584282010-12-31T22:35:52.348-05:002010-12-31T22:35:52.348-05:00Have you considered using the json serializer? I&#...Have you considered using the json serializer? I&#39;m starting to switch to json for large data feeds, since they typically require about half the bandwidth of an equivalent xml feed.<br /><br />A few years back I was doing some serialization with hybernate and castor in Java. When I traced the bottleneck to it&#39;s source, I found that over 90% of the time was spent expanding the string builder. The performance was so bad that it threatened to derail the whole project. I ended up passing in a stringbuilder with a preset capacity so that it would not need to be continually resized.<br /><br />That being said, you might see a similar result in C# by initializing the StringWriter as follows:<br /><br />StringWriter w = new StringWriter(new StringBuilder(myExpectedCapacity));BMarquishttp://www.blogger.com/profile/02360889147524947362noreply@blogger.comtag:blogger.com,1999:blog-5492774.post-90796489798280050832010-12-31T22:24:05.980-05:002010-12-31T22:24:05.980-05:00This comment has been removed by the author.BMarquishttp://www.blogger.com/profile/02360889147524947362noreply@blogger.com