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]

Reply via email to