Project

Profile

Help

Bug #5094

closed

Caching of last() at context level is not working

Added by Michael Kay about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2021-09-16
Due date:
% Done:

100%

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

Description

The code is designed so that the value of last() only ever needs to be computed once for a given dynamic context (this is because it can be expensive to compute, requiring lookahead). It is actually cached at two levels: the FocusTrackingIterator, and the XPathContextMinor. The caching at iterator level is working, but the caching at context level is not. This mainly affects multi-threading situations where several iterators may be obtained over the same underlying sequence.

There is no specific test case for this patch, but it has been present in the 11 branch for some while, and was verified by tracing in the debugger.

Please register to edit this issue

Also available in: Atom PDF