XML Transformation: Xslt vs .NET. Part 3.

Part 1.
Part 2.
Part 3.

Max Toro commented on the Part 1 and his suggestions changed a lot.

So, I have added this Part. It shows, how a small optimization could change the test results.

Actually, I have added just two lines of code, that’s it.

Next update is related to the garbage collection. Results were unstable, not now. The changes again were in small piece of code in test cycle:


Measurements got additional numbers. The Max time is important in cases, where we want to do a single transformation. Min and Average-90% times are important, when we need a lot of cycles transforming the same objects. Average-100% time is important, when we are somewhere in between. 99st% shows how fast the times are stabilized and moved towards the Min.

Updated Test Results

Updated Conclusions:

  • Xslt transformation speed is on a par with Object transformation speed on broad spectrum of the message sizes.
  • If you use Json instead of Xml, Json is always faster. The object size is matters. 
  • The object size is more important than the method of transformation for large objects. So the best way to improve speed for the large objects is to compact the object serialized string. Remove all indents, spaces, all white space and this significantly speeds up the transformation. Remove it for both, the source and the target strings.
  • The speed differences between three mentioned transformation methods are not significant, so choose on base of the development skills and speed. The development skills and knowledge beats the technology.
Print | posted on Thursday, April 2, 2015 7:51 PM


No comments posted yet.
Post A Comment