You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
XSLT step leaks memory when a SaxonApiException is thrown on a stylesheet compile
We are currently reusing the XPipeline instance for multiple executions with calls originating from a single JVM, however under certain error conditions we have experienced memory leaks. We have investigated further and found the culprit was in XLST.java
However if an exception occurs during the stylesheet compile this step above is not performed leaving a new CollectionResolver in memory referencing the previous instance, this repeats for each subsequent execution leading to a large memory leak. Further analysis has shown another instance of this bug to be present is XQuery.java.
A quick workaround would be to move the statement config.setCollectionURIResolver(collectionResolver); into a finally block after the stylesheet compilation.
The text was updated successfully, but these errors were encountered:
XSLT step leaks memory when a SaxonApiException is thrown on a stylesheet compile
We are currently reusing the XPipeline instance for multiple executions with calls originating from a single JVM, however under certain error conditions we have experienced memory leaks. We have investigated further and found the culprit was in XLST.java
The previous collection resolver is restored after the stylesheet compile allowing the JVM to cleanup the above temporary created CollectionResolver:
However if an exception occurs during the stylesheet compile this step above is not performed leaving a new CollectionResolver in memory referencing the previous instance, this repeats for each subsequent execution leading to a large memory leak. Further analysis has shown another instance of this bug to be present is XQuery.java.
A quick workaround would be to move the statement config.setCollectionURIResolver(collectionResolver); into a finally block after the stylesheet compilation.
The text was updated successfully, but these errors were encountered: