Feature #4078
closedFast XPath parsing for simple expressions
100%
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.
Updated by Michael Kay over 5 years ago
- Status changed from New to Resolved
- Fix Committed on Branch 9.9 added
Updated by Michael Kay over 5 years ago
Fixed a couple of cases where this was leading to test failures (e.g. syntax errors not detected).
Updated by O'Neil Delpratt about 5 years ago
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.9.1.1 added
Bug fix applied to the Saxon 9.9.1.1 maintenance release.
Updated by O'Neil Delpratt about 5 years ago
- Status changed from Resolved to Closed
Please register to edit this issue