Actions
Feature #4078
closedFast XPath parsing for simple expressions
Start date:
2018-12-20
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
9.9
Fix Committed on Branch:
9.9
Fixed in Maintenance Release:
Platforms:
Description
In XSLT, many path expressions are extremely simple. I collected some data and found that about 50% of path expressions in XSLT stylesheets belong to simple patterns such as @x
or $x
or function()
that can be readily detected after tokenization without going into the full recursive-descent parser, which has a lot of overhead for such simple expressions.
I've implemented a plug-in to the XPath parser for Saxon-EE that does this pre-scanning. The gains are not huge (about 4%), but they are worthwhile. The feature may make a bigger difference for applications that execute XPath expressions directly from Java, and fail to use caching to reduce XPath parsing costs.
Please register to edit this issue
Actions