Optimize away always-true hold count clause user/miker/faster-hold-count-per-record
authorMike Rylander <mrylander@gmail.com>
Tue, 16 Jul 2013 20:58:57 +0000 (16:58 -0400)
committerMike Rylander <mrylander@gmail.com>
Tue, 16 Jul 2013 20:58:57 +0000 (16:58 -0400)
commit6d0d425b3e0e8a14dc6ae6e3756d3d7213cb3619
tree96c7a5141cb91b5643f62c8d1aaaaaf37979e457
parentcc375f60c2e7fdfdf3075916da2ff319799a0c64
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.

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