[xquery-talk] xquery with large xml file

Per Bothner per at bothner.com
Thu Apr 13 13:30:25 PDT 2006

Michael Kay wrote:
> I fixed what I assumed was a typo.

I tried this:

declare function local:pathOfNode($node)
   if(empty($node/..)) then ""  else
    concat(local:pathOfNode($node/..), "/", local-name($node))
let $j:= doc("file:/tmp/standard")
for $n in  $j//* return

on the 100MB "standard" XMark test file, and then did:

$ java kawa.repl --main -C /tmp/path.xq
$ (date; java -Xmx600m path ; date)>&/tmp/log

That triggered a bug.  After fixing that bug, it seems to have made
it through, taking 8 minutes 24 seconds to generate a 75MB file.

Note Qexo doesn't stream the input file in this case, but it does
have a compact internal representation.

There is an obvious optimization that would probably help a lot:
The concat routine could "write" the arguments to the passed-in
output "consumer", without actually constructing the result.
	--Per Bothner
per at bothner.com   http://per.bothner.com/

More information about the talk mailing list