Hi Markus,
I have reversed the way getstatus and getstatuses interact. Rather than having getstatuses split up the item ids and send them to getstatus, I have getstatus turn the single id into an array and pass that to getstatuses.
getStatuses now submits one sql request which is equivalent to select x, y and z from database where id = 1 and id = 2 and id = 3 etc
I haven't benchmarked it but it certainly seems to have improved speed.

From: Markus Fischer [mailto:info@flyingfischer.ch]
Sent: Fri 30/04/2010 09:11
To: vufind-tech@lists.sourceforge.net
Subject: [VuFind-Tech] speeding up getStatuses

I am trying to speed up the function getStatuses within the driver-section.

Has anybody already found a solution for the serialised web-requests,
that the drivers do generate?

getStatuses will issue up to 20 requests one after the other, always
waiting untill the previous has finished before starting a new one.

Now, with PHP it isn't possible to work truely multithreaded. But are
there some other creative ways of speeding things up?

What I already did:

Improve SQL-performance on the side of the "ILS" (only a register, not a
true ILS). There are always two sides... ;-)

So after that:

sending 20 serialised request

ab -n 20 "http://target" results in 5.715 seconds

while sending 20 requests per 10 concurrent

ab -n 20 -c "http://target" results in 0.842 seconds

Is there a way to make this kind of paralellised approach happen for
getStatuses in PHP?


Vufind-tech mailing list