Hi,

Regarding PHP access (we use it in our product www.mysimplegrid.com) I know we've had some issues at one point because of a setup on Apache. I'll try to find out what was the issue and I'll get back to you.

Cordialement / Best Regards,

Yoann Maingon
CEO - Minerva France

+33 6 64 32 49 66

Download Aras Innovator - Téléchargez Aras Innovator



2013/1/10 Mayer, Jonathan <JMayer@t-tales.com>
Hi all,

Sorry to dig up this old topic but despite the speed gain from not running PHP extensions, I'm continuing to have problems with the speed of opening my XML files.

I have a document which has around 30,000 rows (and slowly growing)

Running:

XQUERY db:open('project', 'Links.xml')

>From the command line displays the file in 4.5 seconds

Running it in PHP takes about 9 seconds.

Both seem very slow. I know it's a large document but does this sound slow to you?

Any ideas for improving gratefully received!

Jon.

-----Original Message-----
From: Christian Grün [mailto:christian.gruen@gmail.com]
Sent: 05 December 2012 15:29
To: Mayer, Jonathan
Cc: Bill Beck; basex-talk@mailman.uni-konstanz.de
Subject: Re: [basex-talk] Query slow via PHP

> Thought you may like to know that I have reduced the speed of the call from 15 seconds to 5 by not running the xdebug extension in PHP. I'm guessing there may be further improvements that can be made in the PHP config.

Good to hear; keep us updated,
Christian


> -----Original Message-----
> From: Bill Beck [mailto:bbeck@masshist.org]
> Sent: 05 December 2012 13:03
> To: Mayer, Jonathan
> Cc: Christian Grün; basex-talk@mailman.uni-konstanz.de
> Subject: Re: [basex-talk] Query slow via PHP
>
> 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.gruen@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