Sean Russell wrote: > Michael Neumann wrote: > > > Did you use the SimpleTreeParser of XMLParser ? It's *very* slow for > > really large documents (1 MB, many tags). Very slow means a factor of > > 1000+ ! > > But my own benchmarks showed me that the Stream Parser of NQXML is > > usually 2 times slower than XMLParser's Stream Parser, which is quite > > good for a pure Ruby solution. > > According to Takahashi's benchmarks, NQXML's stream parser is 50 times > slower than XMLParser. My benchmark program comes out with about the same > results (1.6 parses per second for NQXML, vs. 53 pps for XMLParser). All > of NQXML's parsers are slower than XMLParser, but for all other functions, > NQXML is faster than XMLParser. Sorry, I mixed this up. My XML-RPC benchmarks results showed that XMLSteamParser is usually 20 times faster than NQXMLTreeParser and still about twice as fast as XMLTreeParser. I tried SimpleTreeParser to encode a XML document with one Base64 encoded tag of size > 1MB which took minits to complete. For large documents XMLStreamParser (0.5 MB) is ~350 times faster than NQXMLTreeParser and still about 18 times faster than XMLTreeParser. > This is the important point, for me. If there isn't a compelling speed > reason to use the native version, I say that there are a lot of reasons to > use a pure Ruby implementation. I'd like to see a standard parser interface. This way both a pure Ruby and a C extension would be interchangable. Would be REXML's API the right choice for this? > IMHO, the only choice at this point is between REXML and NQXML. I only worked with NQXML, but what I've seen so far about REXML impressed me. Regards, Michael -- Michael Neumann merlin.zwo InfoDesign GmbH http://www.merlin-zwo.de