Project

Profile

Help

Patch #1841

closed

Potential optimization in XPathSelector

Added by Stuart Barker almost 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Performance
Sprint/Milestone:
-
Start date:
2013-07-12
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

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

saxonPatch.txt (3.09 KB) saxonPatch.txt Stuart Barker, 2013-07-12 14:07

Please register to edit this issue

Also available in: Atom PDF