Skip to content

rewrite queries to improve performance and output proper JSON

Daniel Roewenstrunk requested to merge speedup into develop

Created by: peterstadler

While debugging via monex I found out that the functions local:findAnnotations and local:getMeasures were some bottlenecks since they were not able to employ the indexes properly.

The main improvement (hack?) of this PR is to do a two-step query. A first predicate (which gets evaluated first in eXist) uses a simple contains() to narrow down the result set and the second predicate then picks the proper results from the smaller result set.

A second modification introduced here is to return proper JSON (i.e. the mime type "application/json") which seems to work fine :)

Merge request reports

Loading