Hi BaseX team!
How to increase performance of parsing and executing on custom xqm module? I have 10K lines of sxq code and it makes huge CPU load on the parsing process.
Any ideas?
Hi Alex,
10k of XQuery code doesn't sound too much. Did you already test how much time goes into parsing, compiling and evaluating the query? You can e.g. see this by looking at the blue bars in the Info panel in the GUI, or by using -V on command line.
Best, Christian
On Fri, Jun 19, 2015 at 5:18 PM, Alexander Shpack shadowkin@gmail.com wrote:
Hi BaseX team!
How to increase performance of parsing and executing on custom xqm module? I have 10K lines of sxq code and it makes huge CPU load on the parsing process.
Any ideas?
-- s0rr0w
On Mon, Jun 22, 2015 at 9:29 AM, Christian Grün christian.gruen@gmail.com wrote:
Hi Alex,
10k of XQuery code doesn't sound too much. Did you already test how much time goes into parsing, compiling and evaluating the query? You can e.g. see this by looking at the blue bars in the Info panel in the GUI, or by using -V on command line.
2-3 seconds on slow CPU (Athlon). If I run one function from the module directly, it works fine. The trouble in module parsing.
Best, Christian
On Fri, Jun 19, 2015 at 5:18 PM, Alexander Shpack shadowkin@gmail.com wrote:
Hi BaseX team!
How to increase performance of parsing and executing on custom xqm
module?
I have 10K lines of sxq code and it makes huge CPU load on the parsing process.
Any ideas?
-- s0rr0w
2-3 seconds on slow CPU (Athlon). If I run one function from the module directly, it works fine. The trouble in module parsing.
The largest XQuery module I have processed so far was about 1mb, and execution time for the parsing step was less than a second, so I would be interested to see the numbers that are output by BaseX (...maybe it's not really the parsing or compilation time that causes the bottleneck). Do you think that's possible?
Thanks in advance, Christian
On Fri, Jun 19, 2015 at 5:18 PM, Alexander Shpack shadowkin@gmail.com wrote:
Hi BaseX team!
How to increase performance of parsing and executing on custom xqm module? I have 10K lines of sxq code and it makes huge CPU load on the parsing process.
Any ideas?
-- s0rr0w
-- s0rr0w
Parsing: 1539.6 ms Compiling: 46.47 ms Evaluating: 115.02 ms Printing: 5.84 ms Total Time: 1706.94 ms
Hit(s): 1 Item Updated: 0 Items Printed: 1927 Bytes Read Locking: local [***, ***] Write Locking: none
Query executed in 1706.94 ms.
On Mon, Jun 22, 2015 at 9:29 AM, Christian Grün christian.gruen@gmail.com wrote:
Hi Alex,
10k of XQuery code doesn't sound too much. Did you already test how much time goes into parsing, compiling and evaluating the query? You can e.g. see this by looking at the blue bars in the Info panel in the GUI, or by using -V on command line.
Best, Christian
On Fri, Jun 19, 2015 at 5:18 PM, Alexander Shpack shadowkin@gmail.com wrote:
Hi BaseX team!
How to increase performance of parsing and executing on custom xqm
module?
I have 10K lines of sxq code and it makes huge CPU load on the parsing process.
Any ideas?
-- s0rr0w
That's indeed unusual. Maybe some things are happening in the parsing step that are supposed to happen at evaluation time? Could you possibly run the query with the following call and send us the result?
java -Xrunhprof:cpu=samples,depth=25 -cp BaseX.jar org.basex.Basex -r10 your-query.xq
If you manage to create an SSCCE of the code and data, that would even be better.
Back to your original question: Currently, there is no way to precompile XQuery expressions. However, repeatedly executed queries should be evaluated faster when using the client/server architecture.
Christian
On Mon, Jun 22, 2015 at 3:31 PM, Alexander Shpack shadowkin@gmail.com wrote:
Parsing: 1539.6 ms Compiling: 46.47 ms Evaluating: 115.02 ms Printing: 5.84 ms Total Time: 1706.94 ms
Hit(s): 1 Item Updated: 0 Items Printed: 1927 Bytes Read Locking: local [***, ***] Write Locking: none
Query executed in 1706.94 ms.
basex-talk@mailman.uni-konstanz.de