From: Devlin, Kurt <Kurt.D<evlin@we...> - 2001-08-03 14:45:03
We've also experienced memory leaks, but haven't had the time or patience to
track them down. With large documents, Saxon often faults with an "out of
memory" error. Using Xalan and the same style sheet and document, we were
able to run with a much smaller memory usage.
From: Paul Boocock [mailto:paulb@...]
Sent: Friday, August 03, 2001 10:35 AM
Subject: [saxon] Possible memory leak in Saxon 6.4.3
Some of my stylesheets which ran fine with Saxon 6.4.2 now fail under 6.4.3
with an OutOfMemoryError, after a couple of minutes of disk-thrashing.
I know I was wrong about the cause of the union operator bug (441078) which
I reported, but I'm going to stick my neck out again and suggest a cause for
The fix for 441078 appears to be to add result fragments to the DocumentPool
in FragmentValue and TextFragmentValue. I believe that this prevents them
(and therefore all the elements within them) from being garbage collected.
I use many xsl:variables with a body in my XSLT code, so presumably this
creates many result tree fragments.
As an experiment, I added a line of code to DocumentPool to print the size
every time something was added. The size reached 2447 before the
OutOfMemoryError occurred. With the line in the two FragmentValue classes
which adds the node to the pool commented out, the size stayed at one, and
the stylesheet ran to completion in a short time.
I hope this helps - please excuse my guesses if I'm barking up the wrong
Ashridge Technologies Ltd
Phone +44 1727 846706
Mobile +44 7802 872093
saxon-help mailing list