Note that there are some explanatory texts on larger screens.

plurals
  1. POlibxml2 from java
    primarykey
    data
    text
    <p>This question is somewhat related to <a href="https://stackoverflow.com/questions/530064/fastest-xml-parser-for-small-simple-documents-in-java">Fastest XML parser for small, simple documents in Java</a> but with a few more specifics.</p> <p>I'm working on an application which needs to parse many (10s of millions), small (approx. 300k) xml documents. The current implementation is using xerces-j and it takes about 2.5 ms per xml document on a 1.5 GHz machine. I'd like to improve this performance. I came across this article</p> <p><a href="http://www.xml.com/pub/a/2007/05/16/xml-parser-benchmarks-part-2.html" rel="nofollow noreferrer">http://www.xml.com/pub/a/2007/05/16/xml-parser-benchmarks-part-2.html</a></p> <p>claiming that libxml2 can parse about an order of magnitude faster than any java parsers. I'm not sure if I believe it, but it caught my attention. <strong>Has anyone tried using libxml2 from the jvm? If so, is it faster than java dom parsing (xerces)?</strong> I'm thinking I'd still need my java dom structure, but I'm guessing that copying from a c-structured dom into java-dom shouldn't take long. I must have java-dom - sax will not help me in this case.</p> <p><strong>update</strong>: I just wrote a test for libxml2 and it wasn't any faster than xerces... granted my c coding ability is extremely rusty.</p> <p><strong>update</strong> I broadened the question a bit here: <a href="https://stackoverflow.com/questions/3825206/why-is-sax-parsing-faster-than-dom-parsing-and-how-does-stax-work">why is sax parsing faster than dom parsing ? and how does stax work?</a> and am open to the possibility of ditching dom.</p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload