DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12486>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=12486 XPathContext.reset() does unnecessary memory allocations Summary: XPathContext.reset() does unnecessary memory allocations Product: XalanJ2 Version: 2.4 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: org.apache.xpath AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Method XPathContext.reset() creates many new instances of java objects, causing unnecessary memory allocations, instead of reuse previosly created objects. Examples: m_dtmManager = DTMManager.newInstance( org.apache.xpath.objects.XMLStringFactoryImpl.getFactory()); Documentation on DTMManager says it should use single instance instead m_currentExpressionNodes = new int[RECURSIONLIMIT]; // Why don't use previous arrays? m_currentNodes = new int[RECURSIONLIMIT]; // Why don't use previous arrays? m_axesIteratorStack = new Stack(); // Why don't call Stack.clear() m_contextNodeLists = new Stack(); // Why don't call Stack.clear() Method reset called every time from TransformerImpl.transfrom() method, allocating many objects which never used after this call
