[Bug 6801] Patron details page slow to load when many checkouts present

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Bug 6801] Patron details page slow to load when many checkouts present


Katrin Fischer <[hidden email]> changed:

           What    |Removed                     |Added
   Attachment #5544|0                           |1
        is obsolete|                            |

--- Comment #9 from Katrin Fischer <[hidden email]> 2011-09-26 20:15:10 UTC ---
Created attachment 5598
  --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5598
[SIGNED-OFF] Bug 6801: checkoverdues returns unnecessary fields, causing

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

This patch removes the call to GetMemberDetails in build_issue_data; this
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 <[hidden email]>
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 <[hidden email]>

Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
Koha-bugs mailing list
[hidden email]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/