]> git.evergreen-ils.org Git - Evergreen.git/commit
Optimize away always-true hold count clause
authorMike Rylander <mrylander@gmail.com>
Tue, 16 Jul 2013 20:58:57 +0000 (16:58 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Wed, 17 Jul 2013 17:53:37 +0000 (13:53 -0400)
commit0c6580309531ec03ccf1a07b1e439e20289c475f
treeb09727eb035dcbb2e1820349afd3c7f95d8eaaac
parent55e62cb268e2435dfa052027229e635a243defd6
Optimize away always-true hold count clause

When rendering results in the tpac we request hold counts for each record.
Most of the time (that is, whenever org unit hiding is /not/ in use) we
filter, essentially, on "where pickup_lib is in the org tree".  This is
both useless and slow, so this commit will recognize that and optimize the
test away.

[LFW: fixed typo]

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm