Hi Zeid, I have experience exactly the same problem you have, and I ended up implementing the same workaround. This problem is being tracked as http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13447, but there hasn't been any activity on it yet (as far as I can tell).
Thanks, Jim -----Original Message----- From: Zeid Derhally [mailto:derhally@;metrowerks.com] Sent: 25 October 2002 17:22 To: xerces-c-dev Subject: DOM to LocalFileFormatTarget slow? I'm working with a 2 meg XML file and it seems writing out the DOMTree back to another file is slow. Xerces' XercesDOMParser reads in the XML file in .32 seconds, but writing out the generated DOM tree back to disk takes around 3 minutes. Looking at the LocalFileFormatTarget and the way the method writeChars() is called it seems inefficient for large XML files since it writes really small buffers, raning from from 5 characters to whatever, to disk at a time. I tried writing the tree to memory using MemBufFormatTarget and then writing the buffer back to disk, and that about .230 of a second. I've browsed the source and I did not see any buffering mechanism, or an option to have that, when going directly from the DOM tree to disk. Am I correct in my findings or did I overlook something? Thanks, Zeid --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]