Bug #1908
closedPerformance: patterns calling a function in a predicate
100%
Description
When an XSLT pattern contains a predicate that calls a function, for example
match="a[is-interesting(.)]"
the pattern is classified and compiled before it is determined that the function returns a boolean. As a result, the compiled form of the pattern assumes that the function is capable of returning an integer, which would make it dependent of the position of the "a" element relative to its siblings. Such "positional" patterns are very expensive to evaluate compared with pure boolean patterns. In the case that led to this bug report, stylesheet execution time increased from around 1 second to around 2 minutes as a result.
A patch is being placed in Subversion. The effect of the patch is to re-evaluate whether the predicate is positional at a later stage of analysis and recompile the pattern if so.
Related issues
Please register to edit this issue