An export of the Links.xml, by the way, shows that it's a 4.4meg file, so it's not small, but it's all localhost so it's not a network issue as far as I'm aware.
Good to know; so it seems that the PHP API isn’t very good at retrieving data (and I was too careless claiming that the API to be used does not matter). Out of interest: I guess that your query will be evaluated much faster when wrapping it with "count(...)" ?
count( db:open('project', 'Links.xml') )
I’m no PHP expert, but I looked into the PHP client, and I saw/remember it uses some buffering:
https://github.com/BaseXdb/basex-api/blob/master/src/main/php/BaseXClient.ph...
Maybe someone else on the list has some idea how the API could be improved, or if there's any other reason for the delay?
Christian