This Week on C9 from Blizzcon with Mike "Sampy" Sampson

Play This Week on C9 from Blizzcon with Mike "Sampy" Sampson

The Discussion

  • User profile image
    I'm afraid that Alvin Ashcraft's test is fatally flawed. Using XMLDocument, the most efficient way to stream information is using the FileStream and not MemoryStream library.

    Linq's disadvantage is that you have to load all the data into memory before you can perform actions upon the data. Using XMLDocument properly you would copy the data node by node, this would trounce Linq 365 days a year.

    Close but no cigar!
  • User profile image

    [FYI - It's actually Anil RV's test, not Alvin Ashcraft's test]

    If you've looked at the test though, it doesn't test streaming XML from a filestream, instead it tests building an in-memory XML document dynamically. That's not to take away from your point, it's just that the test is only for in-memory XML document creation.

    It would be great if you could build your own micro-performance benchmark on loading XML from a filestream to see the performance advantages/disadvantages of XMLDocument vs XElement (and probably XMLTextReader which I would think should be the fastest).


  • User profile image
    I stand corrected I meant XMLTextReader. One of the first commercial applications I wrote did just this, and I opted for the lower level API's because it was processing XML data via webservices so loading data was not an option (XML files with lots of orders)

    I wish I had the time to test this at present, but the XML team have these blogs that some people may find useful. I must add if I was faced with doing any XML stuff today, I'd still head straight for the base class I/O libraries, as I don't find them that difficult now.
  • User profile image
    Whew... I'm glad my link to Stephen was not fatally flawed.   Smiley

    Thanks for the linkage, Dan! I'll be at PDC with the booth crew. Stop by and say hi if you have a minute.

Add Your 2 Cents

More episodes in this series

Related episodes