Patch #1841
closedPotential optimization in XPathSelector
0%
Description
This is a proposed patch for a relatively simple optimization of the code in XPathSelector (and related code in XPathExecutable) to switch the declaredVariables field from a List to a Map (from QName to variable). In many circumstances this will make little difference. However, on some data sets we have been using, which require large numbers of evaluations of XPath expressions containing many variables, the map lookup gave a material improvement over the list iteration in XPathSelector.setVariable.
Since the Map can be constructed in the existing loop in XPathExecutable we believe that any additional setup time should be minimal.
Files
Updated by Michael Kay about 11 years ago
- Category set to Performance
- Status changed from New to Resolved
- Priority changed from Low to Normal
- Found in version set to 9.5
I have implemented this change on the 9.6 branch. Thanks for the suggestion.
Updated by Michael Kay about 11 years ago
- Status changed from Resolved to Closed
- Fixed in version set to 9.6
Please register to edit this issue