Project

Profile

Help

Memory problems after migration from 9.1.0.8 to 9.8.0.4

Added by Karol Szmit about 7 years ago

Hello,

I'm currently trying to migrate from Saxon 9.1.0.8 to 9.8.0.4 PE (evaluation licence for development and tryout) in my copmany java application and I have encountered memory problems.

First thing is that we are caching XQueryExpression objects for further reuse and had no memory problems with 9.1 version.

Simplified workflow: XQueryExpression exp = ...loadXquery(...) Configuration config = exp.getStaticContext().getConfiguration(); DynamicQueryContext dynamicContext = new DynamicQueryContext(config); ... NodeInfo xmlNode = (new DOMObjectModel()).unravel(new DOMSource(getXmlData(...)), config);

afterwards we set parameters and also load other documents using doc function but then we discard everything using Extensions.discardDocument

After heapdump anaIysis I think the root cause is that in TypeHierarchy map field we store SameNameTest object with reference to DOMNodeWrapper that stores a lot of data (based on retained heap size) and it's main difference in heapdump between version 9.1.0.8 and 9.8.0.4

Any pointers how to deal with that or what could be the real cause of memory issues are greatly appreciated.


Replies (4)

Please register to reply

RE: Memory problems after migration from 9.1.0.8 to 9.8.0.4 - Added by Michael Kay about 7 years ago

Thanks for reporting it and for your useful analysis of the cause of the problem.

I may have to ask for a repro (code I can run to reproduce the problem) but I'll try and see if I can trigger it from the information provided. I can see theoretically that putting a SameNameTest object in the TypeHierarchy cache would cause this problem, but I can't immediately see a code path on which this going to happen.

RE: Memory problems after migration from 9.1.0.8 to 9.8.0.4 - Added by Karol Szmit about 7 years ago

Due to company policies I'm not able to provide the code as-is and extraction of this case I think could take me some time.

Thank you for logging it as a bug. Is it going to be released with 9.8.0.5 and if so is there any estimated release date for 9.8.0.5?

RE: Memory problems after migration from 9.1.0.8 to 9.8.0.4 - Added by Michael Kay about 7 years ago

OK, we'll release the fix with regression-testing only.

We're planning to work on testing a new maintenance release this week.

    (1-4/4)

    Please register to reply