Bug 24683: Optimize loop in ItemsAnyAvailableAndNotRestricted
authorAndrew Nugged <nugged@gmail.com>
Fri, 17 Jul 2020 11:59:19 +0000 (14:59 +0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 24 Aug 2020 08:12:45 +0000 (10:12 +0200)
commit720b69780c1f62c61f4b36df02d46d8c85c0d30a
tree10b55b3db0cee7d4d92b1139597c5e8f295d753b
parent618cf80df9b0b668174b28ff61cad8a938704ec3
Bug 24683: Optimize loop in ItemsAnyAvailableAndNotRestricted

Add cut-off shortcut (return from inside the loop) when first
"Any Available And Not Restricted" item found, because one is
enough for "Any".

Testing: no change visible for code behavior/results,
it is just faster because won't loop over the whole set.

Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Reserves.pm