C# & GC

  • Thread starter Thread starter Maxim Kazitov
  • Start date Start date
I do the same thing: read a huge XML with XmlReader - just in order to split
it into individual records. Then I read each individual record into an
XmlDocument and retrieve data from it with XPath or transform it into
another Xml with XSLT. And there is no performance drop during the process -
it keeps constant pace of 600 - 900 records / sec, depending on the
complexity of operation involved.
So I think there is no problem with allocating lots of XmlDocuments, it must
lie somewhere else...

Best Regards
Rafal Gwizdala

john conwell said:
Hi Maxim,
I think your gona have to post a code snipit of what your doing. My
general
rule is to use the XmlTextReader to read node by node. DONT create
XmlDocument objects because they are heavy. DONT do XPath. DONT do xslt.

My recomendation, without seeing what you are doing, is to read the xml
document node by node, and write to a file stream for each node.
 
Back
Top