I wrote a query that replaced roughly 470153 text nodes with an element that had two namespaces declared on it. It ran for several hours.
I didn't need or want these namespaces, they were in the original source. I rewrote the query to remove the namespaces from these nodes before replacing the text node. I don't know how quickly it ran, but I think not more than 15 minutes, the first time I checked on it, it had already finished. I made no other changes to the query.
Is this surprising? Or is this a general lesson about performance and updates that add namespaces low down in the hierarchy? Or ...
Jonathan
Hi Jonathan,
The query may run faster if the namespaces are declared in one of the ancestor elements. Otherwise, they need to be re-declared many times in the XML structure, and that takes additional time and memory.
Still, it’s difficult to make generalized statements about execution times with or without namespaces …
Best, Christian
On Thu, Feb 17, 2022 at 1:46 PM Jonathan Robie jonathan.robie@gmail.com wrote:
I wrote a query that replaced roughly 470153 text nodes with an element that had two namespaces declared on it. It ran for several hours.
I didn't need or want these namespaces, they were in the original source. I rewrote the query to remove the namespaces from these nodes before replacing the text node. I don't know how quickly it ran, but I think not more than 15 minutes, the first time I checked on it, it had already finished. I made no other changes to the query.
Is this surprising? Or is this a general lesson about performance and updates that add namespaces low down in the hierarchy? Or ...
Jonathan
basex-talk@mailman.uni-konstanz.de