From: Wolfgang M. M. <wol...@us...> - 2004-09-12 09:26:05
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage/store In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21081/src/org/exist/storage/store Modified Files: DOMFile.java NodeIterator.java Log Message: * Added support for XQuery pragmas to set serialization and watchdog settings. * org.exist.storage.serializers.Serializer now passes all output to an instance of the Receiver interface instead of a SAX ContentHandler. Receiver resembles SAX, but has methods that are closer to eXist's internal storage. For example, it directly accepts a QName in startElement to avoid unnecessary string allocations. * Fixed various performance leaks in cross-document joins. Index: DOMFile.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/DOMFile.java,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** DOMFile.java 16 Aug 2004 19:47:11 -0000 1.51 --- DOMFile.java 12 Sep 2004 09:25:21 -0000 1.52 *************** *** 792,796 **** final long firstChildId = XMLUtil.getFirstChildId(doc, id); ! final Iterator iter = new NodeIterator(lock, this, node.doc, parentPointer); final NodeImpl n = (NodeImpl) iter.next(); --- 792,796 ---- final long firstChildId = XMLUtil.getFirstChildId(doc, id); ! final Iterator iter = new NodeIterator(lock, this, node.getDocument(), parentPointer); final NodeImpl n = (NodeImpl) iter.next(); *************** *** 1679,1683 **** byte flags; for (int pos = 0; pos < dlen;) { ! currentId = ByteConversion.byteToShort(data, pos); flags = ItemId.getFlags(currentId); if (ItemId.matches(currentId, targetId)) { --- 1679,1684 ---- byte flags; for (int pos = 0; pos < dlen;) { ! currentId = (short) ( ( data[pos] & 0xff ) + ( ( data[pos + 1] & 0xff ) << 8 ) ); ! // currentId = ByteConversion.byteToShort(data, pos); flags = ItemId.getFlags(currentId); if (ItemId.matches(currentId, targetId)) { *************** *** 1692,1696 **** pos += 10; } else { ! vlen = ByteConversion.byteToShort(data, pos + 2); if ((flags & ItemId.RELOCATED_FLAG) != 0) { pos += vlen + 12; --- 1693,1698 ---- pos += 10; } else { ! vlen = (short) ( ( data[pos + 2] & 0xff ) + ( ( data[pos + 3] & 0xff ) << 8 ) ); ! // vlen = ByteConversion.byteToShort(data, pos + 2); if ((flags & ItemId.RELOCATED_FLAG) != 0) { pos += vlen + 12; Index: NodeIterator.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/store/NodeIterator.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** NodeIterator.java 28 Jul 2004 18:54:56 -0000 1.14 --- NodeIterator.java 12 Sep 2004 09:25:22 -0000 1.15 *************** *** 40,44 **** throws BTreeException, IOException { this.db = db; ! this.doc = node.doc; this.useNodePool = poolable; if (-1 < node.getInternalAddress()) --- 40,44 ---- throws BTreeException, IOException { this.db = db; ! this.doc = node.getDocument(); this.useNodePool = poolable; if (-1 < node.getInternalAddress()) |