[Koha-bugs] [Bug 26424] Better performance of svc/checkouts

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Sep 20 19:35:00 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26424

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #110379|0                           |1
        is obsolete|                            |

--- Comment #13 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Created attachment 110429
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=110429&action=edit
Bug 26424: Better performance of svc/checkouts

Ajax script svc/checkouts display checkouts of a patron.
For each item, it fetches a Koha::ItemType object and a Koha::AuthorisedValues
object for location,ccode,lost and damaged.

For performance on huge number of checkouts :
Item types should be fetch once before the loop.
authorised values should call
Koha::AuthorisedValues->get_description_by_koha_field because it uses a cache.

I've tested with Plack :
Without patch :
100 checkouts = 6 seconds
1000 checkouts = 60 seconds
With patch :
100 checkouts = 5 seconds
1000 checkouts = 44 seconds

Patch also changes the fact that authorised value categories are no longer
hardcoded LOC,CCODE,LOST and DAMAGED, they depend on default framework.
Like is doing Bug 26323.

Test plan :
1) Dont apply patch
2) Use sql to define some items lost and damaged
3) Look at checkouts table on a patron with a lot of checkouts
4) Apply patch
5) Look at checkouts table again
6) Check infos are the same : record level item type, item type, location,
collection, lost, damaged
7) Check infos are the same in "Number of checkouts by item type"

Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

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

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list