*With* William's patch, the query works for me and the string is never
materialized (where x.xq is William's query):

$ time bin/zorba -f -q /tmp/x.xq
# ... output elided ...

real            0m58.719s
user    0m57.956s
sys             0m0.483s

It takes longer than it should, but it does run to completion in a not-
too-long amount of time. However, the performance is pretty bad
considering:

$ time wc -l /tmp/doc.xml 
 1798219 /tmp/doc.xml

real            0m0.085s
user    0m0.069s
sys             0m0.016s

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/921458

Title:
  file:read-text-lines() blocking

Status in Zorba - The XQuery Processor:
  New

Bug description:
  I wrote the following query:
  import module namespace file ="http://expath.org/ns/file";;

  for $line at $i in file:read-text-lines("doc.xml")
  return
    if($i lt 1104869) then () else concat($line, "
  ")

  Where doc.xml is a large document.
  The result of the query seems to never end and its memory footprint is huge.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/921458/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to