mkwan 2003/01/29 14:03:29
Modified: java/src/org/apache/xalan/xsltc/dom Tag: XSLTC_DTM
SAXImpl.java
java/src/org/apache/xml/utils Tag: XSLTC_DTM
SuballocatedIntVector.java
Added: java/src/org/apache/xml/dtm/ref/sax2dtm Tag: XSLTC_DTM
SAX2DTM2.java
Log:
First step in XSLTC_DTM optimization
Introduce a new class SAX2DTM2 which contains the optimized interfaces for
DTM.
It is now the super class of SAXImpl. The internal int arrays for the
SuballocatedIntVectors are cached in this class to reduce the level of
indirections, thus improving performance.
There is an assumption that this class is used for the non-incremental case,
because we can get rid of many unnecessary checkings if the document is fully
built before node traversal. This is true for XSLTC SAXImpl. In the future it
can also be used by Xalan if it delivers the promise.
We provides another (optimized) version of the base accessor methods from
DTMDefaultBase
(e.g. _exptype) in this class. The new accessors have slightly different
names (e.g.
_exptype2) and are marked as final. It also provides overridden version of
the nested
iterators found in DTMDefaultBaseIterators.
There are still a lot of work in optimizing the nested iterators. Here I only
copy
the code around as place holders.
Revision Changes Path
No revision
No revision
1.1.2.26 +3 -3
xml-xalan/java/src/org/apache/xalan/xsltc/dom/Attic/SAXImpl.java
Index: SAXImpl.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/Attic/SAXImpl.java,v
retrieving revision 1.1.2.25
retrieving revision 1.1.2.26
diff -u -r1.1.2.25 -r1.1.2.26
--- SAXImpl.java 29 Jan 2003 17:13:17 -0000 1.1.2.25
+++ SAXImpl.java 29 Jan 2003 22:03:28 -0000 1.1.2.26
@@ -82,14 +82,14 @@
import org.w3c.dom.NodeList;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
-import org.apache.xml.dtm.ref.sax2dtm.SAX2DTM;
+import org.apache.xml.dtm.ref.sax2dtm.SAX2DTM2;
import org.apache.xalan.xsltc.*;
import org.apache.xml.dtm.ref.*;
import org.apache.xml.dtm.*;
-public final class SAXImpl extends SAX2DTM implements DOM, DOMBuilder
+public final class SAXImpl extends SAX2DTM2 implements DOM, DOMBuilder
{
/* ------------------------------------------------------------------- */
No revision
No revision
1.1.2.1 +1676 -0
xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm/Attic/SAX2DTM2.java
No revision
No revision
1.6.10.3 +19 -1
xml-xalan/java/src/org/apache/xml/utils/SuballocatedIntVector.java
Index: SuballocatedIntVector.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xml/utils/SuballocatedIntVector.java,v
retrieving revision 1.6.10.2
retrieving revision 1.6.10.3
diff -u -r1.6.10.2 -r1.6.10.3
--- SuballocatedIntVector.java 27 Jan 2003 19:45:42 -0000 1.6.10.2
+++ SuballocatedIntVector.java 29 Jan 2003 22:03:29 -0000 1.6.10.3
@@ -567,5 +567,23 @@
}
return -1;
}
-
+
+ /**
+ * Return the internal m_map0 array
+ * @return the m_map0 array
+ */
+ public final int[] getMap0()
+ {
+ return m_map0;
+ }
+
+ /**
+ * Return the m_map double array
+ * @return the internal map of array of arrays
+ */
+ public final int[][] getMap()
+ {
+ return m_map;
+ }
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]