]> git.koha-community.org Git - koha.git/commit
Bug 6801: checkoverdues returns unnecessary fields, causing slowness
authorIan Walls <ian.walls@bywatersolutions.com>
Wed, 31 Aug 2011 18:43:09 +0000 (14:43 -0400)
committerChris Nighswonger <chris.nighswonger@gmail.com>
Sat, 8 Oct 2011 21:42:14 +0000 (17:42 -0400)
commit27de4e13e4e6c1eb0a5beacd3b48227ccb4c8799
treed99c1e145af02c326b78afa5a50f60e0b2b6d9ad
parent9898e6d50ea9c29d1c3198da0766d9dfb8cfeaf8
Bug 6801: checkoverdues returns unnecessary fields, causing slowness

Explicitly specifies which fields to return in C4::Overdues::checkoverdues
SQL:  all of biblio, items, and issues, and everything in biblioitems
EXCEPT marc, marcxml and timestamp.

Bug 6801: member details page taking long time to load when many checkouts present

This patch removes the call to GetMemberDetails in build_issue_data; this heavy-weight
subroutine was being run for every single item a patron (or their relatives) have checked out.
Instead, the borrowers first name, surname and cardnumber are added to the GetPendingIssues query.
I believe this is reasonable since GetPendingIssues can now return issues for multiple borrowers.

Also corrects the $borrowernumber used for GetIssuesCharges and CanItemBeRenewed; was using the borrower whose
page we were on, NOT the borrower of that specific item (which would be different in the Relatives Checkouts tab).

Template calls to [% scope.borrowername %] are now broken up into [% scope.firstname %] [% scope.surname %].

Signed-off-by: Liz Rea <lrea@nekls.org>
On my test data, a patron with 180 checkouts (without this patch) would take more than a minute to bring back the circulation.pl and moremember.pl pages.
With this patch, the time is reduced to 5 or so seconds.

Big ups to Ian for tenaciously hunting this one down.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
C4/Members.pm
C4/Overdues.pm
circ/circulation.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
members/moremember.pl