Hi Sebastian, You should switch to the REST-XQ interface, There is a %rest :single annotation [1] dedicated to that problem.
Best regards, Fabrice Etanchaud CERFrance PCH [1] http://docs.basex.org/wiki/RESTXQ De : BaseX-Talk [mailto:basex-talk-boun...@mailman.uni-konstanz.de] De la part de Sebastian Zimmer Envoyé : mercredi 7 novembre 2018 14:32 À : 'BaseX' Objet : [basex-talk] Perceived performance of REST API Hi, I'm looking for a way to increase the *perceived* performance of the REST API. On my web page there's a results list that is updated automatically when the text content of an input field is changed. This means that on each keystroke by the user, a GET request to the REST API api is sent to obtain the new results list. One GET request takes about 800 ms, which is acceptable to me given the complexity of the query and the amount of data. The problem is that when the user types faster than the queries are executed, the app starts to respond very slowly, because there are now several requests pending. BaseX seems to execute all of them in parallel and it may well take up to 14 seconds until it returns the results of the most recent search query. Is there a way to tell BaseX to abort running queries (by a specific user) to privilege the most recent query (of this user)? Could this be done with the Jobs module? Or is there a better way to implement such a search? Best regards, Sebastian -- Sebastian Zimmer sebastian.zim...@uni-koeln.de<mailto:sebastian.zim...@uni-koeln.de> Cologne Center for eHumanities<http://cceh.uni-koeln.de> DH Center at the University of Cologne @CCeHum<https://twitter.com/CCeHum>