xml - Xslt equals performance improvement -
i want improve performance of xslt 2.0. use saxon-sa 9.0.0.5 xslt processor. of profiling, zeroed bottleneck. here bottleneck piece of code extracted
<xsl:variable name="party" select="/drawdowninventoryandeventnotification/party"/>
-- approximately 500 parties
<xsl:apply-templates select="$party[@id = ($abc/@id union $xyz)]"/>
-- union producing sequence of 20k items. comparison of 20k items party@id cause performance.
thanks in advance valuable solutions / workarounds.
try define key <xsl:key name="party-by-id" match="/drawdowninventoryandeventnotification/party" use="@id"/>
, replace <xsl:apply-templates select="$party[@id = ($abc/@id union $xyz)]"/>
<xsl:apply-templates select="key('party-by-id', $abc/@id union $xyz)"/>
.
Comments
Post a Comment