I have a large XML which needs to be validated against a bunch of things and then manipulated to include more information. Currently, I am doing it with XDocument
and Linq
. The performance (mainly latency) is not good, and I am looking to optimize this. I was thinking of deserializing the XML into a POCO first, and then using it to validate and manipulate its properties. I can then serialize it back to XML at the end.
The XML are generally a few MB in size, so memory is not a big issue. But latency has become a big concern, since I am doing multiple passes.
Before I start investing time into implementing this, I wanted to know if this approach has merit. Will it result into latency improvement?