From: Wolfgang M. M. <wol...@us...> - 2004-09-12 09:26:02
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/storage In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21081/src/org/exist/storage Modified Files: NativeBroker.java NativeTextEngine.java NativeElementIndex.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: NativeBroker.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeBroker.java,v retrieving revision 1.100 retrieving revision 1.101 diff -C2 -d -r1.100 -r1.101 *** NativeBroker.java 16 Aug 2004 19:47:11 -0000 1.100 --- NativeBroker.java 12 Sep 2004 09:25:20 -0000 1.101 *************** *** 1647,1661 **** public Node objectWith(final NodeProxy p) { if (p.getInternalAddress() < 0) ! return objectWith(p.doc, p.gid); return (Node) new DOMTransaction(this, domDb) { public Object start() { Value val = domDb.get(p.getInternalAddress()); if (val == null) { ! LOG.debug("Node " + p.gid + " not found in document " + p.doc.getName() + ! "; docId = " + p.doc.getDocId()); // LOG.debug(domDb.debugPages(p.doc)); Thread.dumpStack(); // return null; ! return objectWith(p.doc, p.gid); // retry? } NodeImpl node = --- 1647,1661 ---- public Node objectWith(final NodeProxy p) { if (p.getInternalAddress() < 0) ! return objectWith(p.getDocument(), p.gid); return (Node) new DOMTransaction(this, domDb) { public Object start() { Value val = domDb.get(p.getInternalAddress()); if (val == null) { ! LOG.debug("Node " + p.gid + " not found in document " + p.getDocument().getName() + ! "; docId = " + p.getDocument().getDocId()); // LOG.debug(domDb.debugPages(p.doc)); Thread.dumpStack(); // return null; ! return objectWith(p.getDocument(), p.gid); // retry? } NodeImpl node = *************** *** 1664,1670 **** 0, val.getLength(), ! (DocumentImpl) p.doc); node.setGID(p.gid); ! node.setOwnerDocument(p.doc); node.setInternalAddress(p.getInternalAddress()); return node; --- 1664,1670 ---- 0, val.getLength(), ! (DocumentImpl) p.getDocument()); node.setGID(p.gid); ! node.setOwnerDocument(p.getDocument()); node.setInternalAddress(p.getInternalAddress()); return node; Index: NativeElementIndex.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeElementIndex.java,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** NativeElementIndex.java 3 Sep 2004 09:18:04 -0000 1.36 --- NativeElementIndex.java 12 Sep 2004 09:25:20 -0000 1.37 *************** *** 160,163 **** --- 160,165 ---- gid = 0; for (int k = 0; k < len; k++) { + // if(result.getLength() > 1000) + // continue; gid = gid + is.readLong(); if(selector == null) Index: NativeTextEngine.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/storage/NativeTextEngine.java,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** NativeTextEngine.java 15 Aug 2004 20:29:09 -0000 1.69 --- NativeTextEngine.java 12 Sep 2004 09:25:20 -0000 1.70 *************** *** 59,63 **** import org.exist.dom.NodeSet; import org.exist.dom.TextImpl; - import org.exist.dom.TextSearchResult; import org.exist.dom.XMLUtil; import org.exist.security.Permission; --- 59,62 ---- *************** *** 427,435 **** TermMatcher matcher, CharSequence startTerm) throws TerminatedException { // long start = System.currentTimeMillis(); ! NodeSet result; ! if (contextSet == null) ! result = new TextSearchResult(trackMatches != Serializer.TAG_NONE); ! else ! result = new ExtArrayNodeSet(); Value ref; Collection collection; --- 426,430 ---- TermMatcher matcher, CharSequence startTerm) throws TerminatedException { // long start = System.currentTimeMillis(); ! NodeSet result = new ExtArrayNodeSet(); Value ref; Collection collection; *************** *** 1224,1233 **** freq = is.readInt(); last = gid; if (contextSet != null) { - proxy = (section == TEXT_SECTION - ? new NodeProxy(doc, gid, - Node.TEXT_NODE) - : new NodeProxy(doc, gid, - Node.ATTRIBUTE_NODE)); parent = contextSet.parentWithChild(proxy, false, true, -1); --- 1219,1228 ---- freq = is.readInt(); last = gid; + proxy = (section == TEXT_SECTION + ? new NodeProxy(doc, gid, + Node.TEXT_NODE) + : new NodeProxy(doc, gid, + Node.ATTRIBUTE_NODE)); if (contextSet != null) { parent = contextSet.parentWithChild(proxy, false, true, -1); *************** *** 1240,1244 **** } } else ! ((TextSearchResult) result).add(doc, gid, word); } } --- 1235,1239 ---- } } else ! result.add(proxy, sizeHint); } } |