docbook-apps

  • 1.  DocBook XSLT Performance

    Posted 10-11-2012 10:12
    Hi all,

    I'm using Xalan and the DocBook XSLT stylesheets to process DocBook
    documents. However, I noticed that, for larger documents, the
    processing becomes very slow. I realize this is partly due to the
    complexity of the stylesheets, but in practice, I don't need all the
    power of DocBook such as i18n etc.

    Is there an easy way to speed up the processing significantly? (e.g.
    hot spots in the stylesheets i can remove if i don't need them)
    I've tried using XSLTC, but the stylesheets don't seem to compile for
    me (and i've seen other posts to the mailing list confirming this).

    thanks!
    Remko



  • 2.  Re: [docbook-apps] DocBook XSLT Performance

    Posted 10-11-2012 10:15
    Em 11-10-2012 12:11, Remko Tronçon escreveu:
    > Is there an easy way to speed up the processing significantly? (e.g.
    > hot spots in the stylesheets i can remove if i don't need them)
    > I've tried using XSLTC, but the stylesheets don't seem to compile for
    > me (and i've seen other posts to the mailing list confirming this).

    Have you tried xsltproc (part of libxslt)? It seemed the fastest choice
    for me.

    Gabor



  • 3.  Re: [docbook-apps] DocBook XSLT Performance

    Posted 10-11-2012 11:37
    On 11.10.2012 12:15, Gabor Kovesdan wrote:
    > Em 11-10-2012 12:11, Remko Tronçon escreveu:
    >> Is there an easy way to speed up the processing significantly? (e.g.
    >> hot spots in the stylesheets i can remove if i don't need them)
    >> I've tried using XSLTC, but the stylesheets don't seem to compile for
    >> me (and i've seen other posts to the mailing list confirming this).
    >
    > Have you tried xsltproc (part of libxslt)? It seemed the fastest choice
    > for me.

    For large documents Saxon usually outperforms xsltproc, for smaller ones
    xsltproc is faster as it doesn't require start of JVM. Xalan is quite
    slow and buggy compared to those two.

    l10n code was refactored ~2 years ago to be much faster in typical
    scenarios (no customizations). So please make sure that you are using
    recent version of DocBook XSL stylesheets.

    Jirka

    --
    ------------------------------------------------------------------
    Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz
    ------------------------------------------------------------------
    Professional XML consulting and training services
    DocBook customization, custom XSLT/XSL-FO document processing
    ------------------------------------------------------------------
    OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
    ------------------------------------------------------------------




  • 4.  Re: [docbook-apps] DocBook XSLT Performance

    Posted 10-11-2012 15:31
    Hi Jirka & Gabor,

    On 11 October 2012 13:37, Jirka Kosek <jirka@kosek.cz> wrote:
    > For large documents Saxon usually outperforms xsltproc, for smaller ones
    > xsltproc is faster as it doesn't require start of JVM. Xalan is quite
    > slow and buggy compared to those two.

    Right, i forgot to mention that I need a Java processor. Changing to
    Saxon would indeed speed up things 2-3 times. I was hoping to find
    some other things that wouldn't require me to change XSLT processors.

    > l10n code was refactored ~2 years ago to be much faster in typical
    > scenarios (no customizations). So please make sure that you are using

    I'm on 1.76.1, which seems to be roughly 2 years ago. I'll see if
    upgrading to a recent release helps.

    thanks!
    Remko



  • 5.  Re: [docbook-apps] DocBook XSLT Performance

    Posted 10-11-2012 19:10
    On 11.10.2012 17:31, Remko Tronçon wrote:

    > Right, i forgot to mention that I need a Java processor. Changing to
    > Saxon would indeed speed up things 2-3 times. I was hoping to find
    > some other things that wouldn't require me to change XSLT processors.

    If you know that switching to Saxon would mean 2-3x speedup then for
    what you are waiting for? Other performance tuning tricks will usually
    give you few percents, sometimes 10% or 20%. Definitively not 300%.

    >> l10n code was refactored ~2 years ago to be much faster in typical
    >> scenarios (no customizations). So please make sure that you are using
    >
    > I'm on 1.76.1, which seems to be roughly 2 years ago. I'll see if
    > upgrading to a recent release helps.

    I think that relevant changes are part of 1.76. It brough 300% speedup
    in xsltproc which doesn't have so good optimizer and around 30% in
    Saxon. I haven't done any benchmarks on Xalan as I wouldn't recommend to
    use it and it is very easy to switch to Saxon even in closed
    applications due to JAXP XSLT transformer factory configuration.

    Jirka

    --
    ------------------------------------------------------------------
    Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz
    ------------------------------------------------------------------
    Professional XML consulting and training services
    DocBook customization, custom XSLT/XSL-FO document processing
    ------------------------------------------------------------------
    OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
    ------------------------------------------------------------------