You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/09/10 18:03:30 UTC
DO NOT REPLY [Bug 12486] New: -
XPathContext.reset() does unnecessary memory allocations
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: xalan-dev@xml.apache.org
ReportedBy: Pavel_Ausianik@epam.com
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