ilene 2002/10/19 18:12:53
Modified: java/src/org/apache/xpath XPathContext.java
Log:
Committing Gordon Chiu's ([EMAIL PROTECTED]) modified patch of Pavel
Ausianik's ([EMAIL PROTECTED])
patch for bugzilla #12486.
Method XPathContext.reset() was creating many new instances of java objects,
causing unnecessary memory allocations, instead of reusing previously created
objects.
m_locNamesPool and m_namespaceNames and code that uses them has
been commented out. Some initialization now done in static initializer.
Revision Changes Path
1.43 +5 -5 xml-xalan/java/src/org/apache/xpath/XPathContext.java
Index: XPathContext.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/XPathContext.java,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- XPathContext.java 7 Oct 2002 18:16:15 -0000 1.42
+++ XPathContext.java 20 Oct 2002 01:12:53 -0000 1.43
@@ -387,13 +387,13 @@
org.apache.xpath.objects.XMLStringFactoryImpl.getFactory());
m_saxLocations.removeAllElements();
- m_axesIteratorStack = new Stack();
- m_contextNodeLists = new Stack();
+ m_axesIteratorStack.clear();
+ m_contextNodeLists.clear();
m_currentExpressionNodes.removeAllElements();
m_currentNodes.removeAllElements();
- m_iteratorRoots = new NodeVector();
- m_predicatePos = new IntStack();
- m_predicateRoots = new NodeVector();
+ m_iteratorRoots.RemoveAllNoClear();
+ m_predicatePos.removeAllElements();
+ m_predicateRoots.RemoveAllNoClear();
m_prefixResolvers.removeAllElements();
m_prefixResolvers.push(null);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]