When running this command in basex on linux it completes in around 2.5 seconds (acceptable speed given the size of the XML file) but when I run it via PHP using the client from the website, it takes around 15 seconds:
There should be no considerable difference reg. the APIs you are using, so.. could you do some more profiling to find out which step of your PHP query takes so long?
$input = "for $doc in collection('project') where matches(document-uri($doc), '^Links.xml') return $doc";
Btw, the following may be faster in boh cases:
db:open('project', 'Links.xml')
Best, Christian