On Wed, 2005-03-09 at 14:44 -0800, [EMAIL PROTECTED] wrote: > > XercesDOMParser *parser = new XercesDOMParser; > > DOMTreeErrorReporter *errReporter = new DOMTreeErrorReporter (); > > Do you really need to build a DOM tree?
No I don't, but I have also tried the SAX parser with the same results > > > It seems that each call to event () is fairly expensive - running at > about 23 docs/sec > > on my system here at work > > I can't give an opinion on this performance figure, since you've provided > no information about your hardware, operating system, or compiler. CPU Freq Size Impl. Mask Die Ambient Speed Unit --- -------- ---------- ------ ---- -------- -------- ----- ---- MB/P0 1002 MHz 1MB US-IIIi 2.4 - - MB/P1 1002 MHz 1MB US-IIIi 2.4 - - Solaris 2.8 Sun-Fire-V210 Sun WorkShop 6 update 2 C 5.3 Patch 111679-14 2004/02/20 > > > MemBufInputSource *buffer = new MemBufInputSource ( (const XMLByte *) > xml, > > strlen ( xml ), > > id, > > false ); > > It's much better to create an object as small as MemBufInputSource on the > stack: Thanks for the tip > > MemBufInputSource buffer((const XMLByte *) xml, strlen ( xml ), id, > false); > > parser->parse ( buffer ); > > If you don't really need DOM trees, then you probably shouldn't build > them. Also, there will be a certain amount of overhead for that does not > vary according the the size of the document. Some of it you can > potentially avoid, and some you cannot. For example, if you know the > schemas you'll be working with up front, you can cache them in the parser. > > Dave > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- Thanks ---------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]