On Sat, Sep 3, 2011 at 5:19 AM, Jirka Kosek <
jirka@kosek.cz> wrote:
> On 2.9.2011 21:24, Tim Arnold wrote:
>
>> Well great, at least in my browser the columns don't line up any
>> longer. I'll try to attach a file with the profile results.
>> I'm not sure what to make of the information--does it mean that the
>> most time was taken up by footnotes?
>
> Yes. Footnotes are slowing down your transformation most. Because
> footnote number can be affected also with links placed as footnotes
> (ulink.footnotes parameter) and footnotes in tables are numbered
> separatedly expression for calculating footnote label is not simple:
>
> <xsl:number level="any"
>
> from="d:chapter|d:appendix|d:preface|d:article|d:refentry|d:bibliography"
>
> count="d:footnote[not(@label)][not(ancestor::d:table) and
> not(ancestor::d:informaltable)]
> |d:ulink[$ulink.footnotes != 0][node()][@url !=
> .][not(ancestor::d:footnote)][$ulink.show != 0]
> |*[node()][@xlink:href][not(@xlink:href =
> .)][not(starts-with(@xlink:href,'#'))]
> [not(contains(@xlink:href,'#') and @xlink:role =
> $xolink.role)]
> [not(@xlink:type) or @xlink:type='simple']
> [not(ancestor::d:footnote)][$ulink.footnotes !=
> 0][$ulink.show != 0]
> "
> format="1"/>
>
>
> If you don't use ulink footnotes and footnotes in tables you can
> override this template and use just:
>
> <xsl:number level="any"
>
> from="d:chapter|d:appendix|d:preface|d:article|d:refentry|d:bibliography"
> count="d:footnote[not(@label)]" format="1"/>
>
> That should bring speedup. Also if documents are relatively stable you
> can run additional preprocessing step and assign footnote number into
> label attribute to skip evaluation of this rather complex expression.
>
> Also have you already tried Saxon as suggested. With complex documents
> it copes faster then xsltproc.
>
> Jirka
>
Hi Jirka, thanks for the information on the footnotes and the nudge to
use saxon...
Wow, I did just try saxon-655 and it makes a huge difference. The book
that took hours using xsltproc now completes in
23 minutes (my customized chunking)
17 minutes (chunking), and
5 minutes (no chunking).
I also tried saxon9.30 and of course I cannot do chunking with it and
the XSLT1.0 stylesheets, but with no chunking it finished in 1 minute
23 seconds.
With results like these I am looking forward to using saxon 9.3+ with
XSLT2.0 some day. I know the 2.0 stylesheets exist in an experimental
version, but the system I'm building now needs to be production-ready
soon.
thanks again!
--Tim