FWIW:
I've been using php for connecting to Java services over CURL for years, 
usually with very fast results. Does the BaseX API use CURL?
One thing I've noticed, back on a Centos 5 setup was that the connection 
between PHP and the db (this was eXist), both on the same machine, was actual 
slower on localhost because the machine was giving higher priority to GUI 
processes. We moved to a server and it much faster.

We're using php with Basex and getting millisecond response times, albeit with 
collections of a few dozen files that are only around 30KB each.

-bb

On Dec 5, 2012, at 6:53 AM, Mayer, Jonathan wrote:

> FWIW, the query is indeed evaluated very quickly when using count() but of 
> course it only returns an int.
>
> -----Original Message-----
> From: Christian Grün [mailto:christian.gr...@gmail.com]
> Sent: 05 December 2012 11:45
> To: Mayer, Jonathan
> Cc: basex-talk@mailman.uni-konstanz.de
> Subject: Re: [basex-talk] Query slow via PHP
>
>> 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.php
>
> 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
> _______________________________________________
> BaseX-Talk mailing list
> BaseX-Talk@mailman.uni-konstanz.de
> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

--
Bill Beck, Web Development Specialist
Massachusetts Historical Society
1154 Boylston Street, Boston, MA 02215
Tel: 617-646-0505, Fax: 617-859-0074
www.masshist.org - America's Oldest Historical Society - Founded 1791


In Death Lamented: The Tradition of Anglo-American Mourning Jewelry opens on 28 
September 2012 and runs through 31 January 2013. The exhibition will be on 
display Monday through Saturday from 10 AM to 4 PM. More information is 
available at www.masshist.org/events/.
_______________________________________________
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

Reply via email to