Project

Profile

Help

Bug #5651

open

Garbage collection of xsl:key indexes

Added by Michael Kay 4 months ago. Updated 3 months ago.

Status:
New
Priority:
Low
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2022-08-18
Due date:
% Done:

0%

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

Description

When Saxon builds an index in support of an xsl:key definition, or an implicit xsl:key generated by the XSLT/XQuery optimizer, the intent is that the key remains in memory so long as BOTH the source document AND the compiled stylesheet or query remain in memory.

This appears not to be working. If we run the same query 1000 times against the same source document, we're seeing the index built 95 times. This suggests the garbage collector is destroying it and we're having to rebuild it the next time it's used.

We use WeakReferences to support this policy, and it looks as if we're getting it wrong.

Note: we also need to check how this works on Saxon-CS, as it's probably different.

Please register to edit this issue

Also available in: Atom PDF