From: Wolfgang M. M. <wol...@us...> - 2004-03-25 13:01:38
|
Update of /cvsroot/exist/eXist-1.0/src/org/exist/xmldb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24347/src/org/exist/xmldb Modified Files: LocalXPathQueryService.java Log Message: * NativeBroker.findElementsByTagName now directly checks child, descendant and descendant-or-self relations by calling a passed instance of class NodeSelector. This saves one processing step when processing path expressions and reduces memory consumption. * clear the XQueryContext before putting a compiled expression into cache. Index: LocalXPathQueryService.java =================================================================== RCS file: /cvsroot/exist/eXist-1.0/src/org/exist/xmldb/LocalXPathQueryService.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** LocalXPathQueryService.java 5 Mar 2004 11:15:27 -0000 1.34 --- LocalXPathQueryService.java 25 Mar 2004 12:50:51 -0000 1.35 *************** *** 125,128 **** --- 125,129 ---- NodeSet contextSet, CompiledExpression expression, String sortExpr) throws XMLDBException { + long start = System.currentTimeMillis(); DBBroker broker = null; Sequence result; *************** *** 155,158 **** --- 156,160 ---- result = ((PathExpr)expression).eval(contextSet, null); expression.reset(); + context.reset(); } catch (EXistException e) { throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage(), e); *************** *** 162,165 **** --- 164,168 ---- brokerPool.release(broker); } + LOG.debug("query took " + (System.currentTimeMillis() - start) + " ms."); if(result != null) return new LocalResourceSet(user, brokerPool, collection, properties, result, sortExpr); *************** *** 171,174 **** --- 174,178 ---- DBBroker broker = null; try { + long start = System.currentTimeMillis(); broker = brokerPool.get(user); XQueryContext context = new XQueryContext(broker); *************** *** 211,215 **** treeParser.getLastException()); } ! LOG.debug("compiled: " + expr.pprint()); return expr; } catch (EXistException e) { --- 215,219 ---- treeParser.getLastException()); } ! LOG.debug("compilation took " + (System.currentTimeMillis() - start)); return expr; } catch (EXistException e) { |