Hi
I'm using BaseX in embedded mode (no database) and need to transform an xml payload that contains elements containing string-encoded xml in this form
... <str><objectInstance fetchDate="2014-02-14T13:00:53.374+01:00">
<createdDateTime>2012-12-04T08:55:26.195Z</createdDateTime> </objectInstance></str> ...
I have both tried using xquery update (copy, modify) and with a simple identity-transform function that intercepts the <str/> element and replaces it with the results of parse-xml(.)
When executing the query in BasexGUI both solutions performs very well. However if i invoke it via the QueryProcessor in my java-process it is 50 to 100 times slower.
Any clues to what i might be missing?
Regards, Johan Mörén
Setting this option in the query proved useful
declare option db:intparse "yes";
Halved the query time in the GUI and provided the same result and performance in embedded mode with the QueryProcessor.
/Johan
On Wed, Feb 19, 2014 at 10:26 AM, Johan Mörén hutchkintoot@gmail.comwrote:
Hi
I'm using BaseX in embedded mode (no database) and need to transform an xml payload that contains elements containing string-encoded xml in this form
... <str><objectInstance fetchDate="2014-02-14T13:00:53.374+01:00">
<createdDateTime>2012-12-04T08:55:26.195Z</createdDateTime> </objectInstance></str> ...
I have both tried using xquery update (copy, modify) and with a simple identity-transform function that intercepts the <str/> element and replaces it with the results of parse-xml(.)
When executing the query in BasexGUI both solutions performs very well. However if i invoke it via the QueryProcessor in my java-process it is 50 to 100 times slower.
Any clues to what i might be missing?
Regards, Johan Mörén
Hi Johan,
thanks for the feedback. It's true that the default Java XML parser (which is used as default since 7.8) is slower than the built-in one, so setting the option, as you did, is a good way out. - Do you know get the expected performance?
Christian
Setting this option in the query proved useful
declare option db:intparse "yes";
Halved the query time in the GUI and provided the same result and performance in embedded mode with the QueryProcessor.
/Johan
On Wed, Feb 19, 2014 at 10:26 AM, Johan Mörén hutchkintoot@gmail.com wrote:
Hi
I'm using BaseX in embedded mode (no database) and need to transform an xml payload that contains elements containing string-encoded xml in this form
... <str><objectInstance fetchDate="2014-02-14T13:00:53.374+01:00">
<createdDateTime>2012-12-04T08:55:26.195Z</createdDateTime> </objectInstance></str> ...
I have both tried using xquery update (copy, modify) and with a simple identity-transform function that intercepts the <str/> element and replaces it with the results of parse-xml(.)
When executing the query in BasexGUI both solutions performs very well. However if i invoke it via the QueryProcessor in my java-process it is 50 to 100 times slower.
Any clues to what i might be missing?
Regards, Johan Mörén
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
basex-talk@mailman.uni-konstanz.de