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
Actions #1

Updated by O'Neil Delpratt over 10 years ago

  • Assignee set to Michael Kay
Actions #2

Updated by Michael Kay over 10 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.

Actions #3

Updated by Michael Kay over 10 years ago

  • Status changed from Resolved to Closed
  • Fixed in version set to 9.6

Please register to edit this issue

Also available in: Atom PDF