I’ve an application that serialize c# objects to xml file. I’m currently using the .Net XmlSerializer.
The problem I’ve, is that I need to serialize ~8000 main nodes(with 4-10 subnodes each time), and it takes me currently something like 15-20min to serialize them all.
I’ve to keep the same XML output, because the file are read by another program than mine, and I cannot make them change the way they read the file.
I’ve made some search, and I found a lot of comparison, but they all involve to use protobuf-net, which has a binary serialization.
So my question is: how can I improve this serialization time? Another serializer? Adding more attributes to my model(currently I’ve only XmlName, same for lists).
Thank you!
Have a look at the below link there are few tips to improve XML serialization performance
http://msdn.microsoft.com/en-us/library/ff650685.aspx
If it is possible for you to change the logic of your component I would use a database to store such a big XML as serialization has not been made to store very large XML file