Matt Magoffin wrote:
Do you use any EXSLT string extension functions? They create result
tree
fragments with token element nodes:
http://exslt.org/str/functions/tokenize/index.html
Agh! Indeed there are some uses of that in some stylesheets, I missed it
in my previous searches. So... if that extension function is creating
these huge DTM documents, do you know if they ever get released? Or will
they hang around as long as I I hang on to a Templates object?
I was looking in the org.apache.xalan.lib.ExsltStrings class, and every
call to tokenize references a cached static Document instance. Could this
be causing all resulting all created Elements in every invocation of
tokenize() to get retained in the JVM forever? It almost seems as such,
given the number of these <token> elements piling up in my application's
heap.
If it's cached at the Templates level, that's a bad implementation
decision, since it not only has to be synchronized, but it will exist for
as long as the Templates object exists.
Dave