« Debugging Properties with Getter Side-Effects, Timers | Main | XML, Embedding HTML in XML »

XmlTextWriter, Console.Out

Text output to Console.Out is enormously slower than output to a text file or to an in-memory string.

Outputting 1000 XML nodes to file or string takes < 10 msecs. Outputting directly to Console.Out can take over a minute.

Outputting XmlTextWriter->StringWriter->Console.Out is again < 10 msecs.

Is there any way to control buffering when go directly XmlTextWriter->Console. Yes there is, you can re-open it with a buffered output stream.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)