Hi Giuseppe,
as you indicated in your last e-mail (in private), it was the debugging output that slowed down the execution of the unparse-text(...) function (the full text strings was added to both the query optimization info and the query plan). I have introduced a size limit [1].
Thanks for sharing your observations, Christian
[1] http://files.basex.org/releases/latest/
On Mon, Aug 14, 2017 at 3:01 PM, Giuseppe Celano celano@informatik.uni-leipzig.de wrote:
Hi,
I have noticed different speeds when running the following functions (from slowest to fastest):
parse-json(unparsed-text('example.txt')) json-doc("example.txt") parse-json(file:read-text('example.txt'))
similarly for documents on the web:
parse-doc('http://example.com/text') parse-json(fetch:text('http://example.com/text'))
Does this make sense to you? Is there any recommendation to follow? Despite the runtime speed difference, I admit I love writing one single function (json-doc) to get map conversion. Everything is so immediate :)
Best, Giuseppe
Universität Leipzig Institute of Computer Science, Digital Humanities Augustusplatz 10 04109 Leipzig Deutschland E-mail: celano@informatik.uni-leipzig.de E-mail: giuseppegacelano@gmail.com Web site 1: http://www.dh.uni-leipzig.de/wo/team/ Web site 2: https://sites.google.com/site/giuseppegacelano/