Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#942 AnyURI cache grows indefinitely when threading

v9.1
closed
Michael Kay
5
2012-10-08
2009-04-17
Michael Kay
No

The class AnyURIValue, which implements the schema type xs:anyURI, maintains a cache of recently used URI values to reduce the cost of checking URI validity on commonly used URIs, especially namespaces. This cache is designed to have a finite size, so the oldest entries are discarded when new entries are added. However, the cache is shared between threads and is implemented without synchoronisation. This does not appear to cause any functional problems, but has the effect that old entries are not being properly discarded, so that the cache gradually grows in size.

A patch to module net.sf.saxon.value.AnyURIValue is being committed. The effect of the patch is to use a ThreadLocal cache in place of the current shared cache.

Discussion

  • Michael Kay
    Michael Kay
    2009-06-17

    Fixed in 9.1.0.7