]> git.evergreen-ils.org Git - working/Evergreen.git/commit
LP#1596595 Targeter use child editor for settings
authorBill Erickson <berickxx@gmail.com>
Tue, 7 Feb 2017 15:27:52 +0000 (10:27 -0500)
committerBill Erickson <berickxx@gmail.com>
Mon, 13 Feb 2017 15:33:29 +0000 (10:33 -0500)
commitd553bf4a1835e286a4f28f70769fb89f93c67646
tree65af55f176b5c7131e342cec74d03601c68b7068
parent57573a96db4b834ee99771b26cfad5e61000ea2a
LP#1596595 Targeter use child editor for settings

Use the CStoreEditor linked to the ::Single (child) targeter object when
possible to fetch org unit setting values.

In cases where settings for many org units have to be retrieved at once,
the settings lookups can take long enough that the in-transaction editor
on the child targeter can timeout.  Using the child's editor directly
for the lookups will prevent this timeout and make the lookups a little
bit faster, since a new connect will not be required for each lookup.

This timeout scenario can occur with settings like
circ.holds.max_org_unit_target_loops and
circ.holds.target_when_closed, when there is wide variety of targetable
copies, because each have to be fetched once per target-able copy circ lib.

A secondary optimization would be a batch org setting lookup that
batches on org unit instead of setting name.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Utils/HoldTargeter.pm