-
XML Writing
I recently did a huge overhaul of my program; part of this included changing the layout of XML files. All is good, other than the XML files can take a long time to (over)write - 20-30 seconds. However, even if you make massive changes, the next save takes no time at all. This suggests to me there might be some caching-type process going on. I have come up with a workaround to protect the data (it was possible to continue working while the save was still going on (long story)), but I wondered if anyone has any ideas around whether I can speed it up.
A little more detail: I was using XMLSerializer; now using StreamWriter - this made it easier to change the xml structure and use loops to drastically shorten the code. The XML files are now about three times larger with the new structure, though still comfortably in KBs; I don't have any examples to hand, but I'd say they go to about 200KB, so not large - why do they take so long first time of saving?
Thanks in anticipation, Steve