SRU/Z39.50 slowness when retrieving holdings
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Undecided
|
Unassigned | ||
2.10 |
Fix Released
|
Undecided
|
Unassigned | ||
2.9 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Evergreen 2.10 (but all supported versions are likely affected)
OpenSRF 2.4
Postgres 9.4
When retrieving records with holdings via SRU, gathering the holdings can be quite slow on a large system. Since the Z39.50 service uses SRU under the hood, that means Evergreen can be quite slow to respond to Z39.50 queries as well.
An SRU search like the following (author search for "dorsey" at a specific org unit, with holdings, limited to 10 results) takes over 15 seconds in our production environment:
/opac/extras/
A similar search in the OPAC returns results in at most 2-3 seconds. The culprit here seems to be the call to open-ils.
I have a proposed fix for this issue which I'll share momentarily.
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
Fix pushed to working branch user/jeffdavis/ lp1609556- z3950-sru- slowness:
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=commitdif f;h=0743bcf
This replaces the call to open-ils. supercat. record. basic_holdings. retrieve with a cstore request to unapi.bre. If holdings are requested, we tell unapi.bre to include holdings_xml, and convert the <holdings> element in the response into a set of MARC 852 tags.
Testing this approach on a large system, I see response times in the 2-3 second range (comparable to the OPAC), as opposed to 15+ seconds previously.