Dramatic performance gains with Libxml

Discussion in 'XML' started by Ramon F Herrera, Sep 16, 2012.

  1. Hello all:

    I am glad to report that after I replaced my previous XPath code with
    libxml2, my application is running faster. In fact, the qualifier
    "Dramatic performance gains" is an understatement. This result is from
    one of my many test cases:

    Processing with with Xerces + XQilla: 12 minutes
    Processing time with libxml: 3 seconds

    Additionally, coding under libxml is much easier and straightforward
    PLUS the support is not even in the same league.

    Congratulations and thanks to all involved!

    Sincerely,

    -Ramon
     
    Ramon F Herrera, Sep 16, 2012
    #1
    1. Advertisements


  2. That was exactly the nature of my problem. The Xerces+Xqilla XPath
    forces you to prepare the XPath query as a dependency to the XML file
    opening and parsing.

    My app, which it is safe to say is typical, processes:

    - 1 XML file
    - 300 XPath queries

    You cannot "factor out" the XML parsing, and my documented ended up
    being opened and parsed 300 times.

    With libxml, I open and parse the XML file ONCE (keep the "doc"
    reference as a constant) and then get into a loop, processing the
    xpath queries.

    -Ramon
     
    Ramon F Herrera, Sep 16, 2012
    #2
    1. Advertisements

  3. The same would apply with Xalan, or any other implementation of the TrAX
    APIs, running against a preloaded document.


    --
    Joe Kesselman,
    http://www.love-song-productions.com/people/keshlam/index.html

    {} ASCII Ribbon Campaign | "may'ron DaroQbe'chugh vaj bIrIQbej" --
    /\ Stamp out HTML mail! | "Put down the squeezebox & nobody gets hurt."
     
    Joe Kesselman, Sep 20, 2012
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.