wrapped contents of the apply-annotations template in a "if"
statement, so that those contents get evaluated only if
annotation.support is non-zero.
The reason for these changes was a report from Doug du Boulay (on
the docbook-apps list) that processing of the apply-annotations
template was consuming 75% of the total processing time for a
2.5Mb file. Anatoly Techtonik followed with a comment that with
1.69.0, "Compiling took about full working day on 12Mb file while
earlier it was about 2-4 hours".
<xsl:template match="annotation"/>
<xsl:template name="apply-annotations">
+ <xsl:if test="$annotation.support != 0">
<!-- do any annotations apply to the context node? -->
<xsl:variable name="id" select="(@id|@xml:id)[1]"/>
<xsl:with-param name="gids" select="normalize-space($aids)"/>
</xsl:call-template>
</xsl:if>
+ </xsl:if>
</xsl:template>
<xsl:template name="annotations-pointed-to">
<refsynopsisdiv>
<src:fragment id='annotation.support.frag'>
-<xsl:param name="annotation.support" select="1"/>
+<xsl:param name="annotation.support" select="0"/>
</src:fragment>
</refsynopsisdiv>