Bug 5179 - GetMember and GetMemberDetails should be combined
Summary: GetMember and GetMemberDetails should be combined
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: 3.4
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Galen Charlton
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks: 7058
  Show dependency treegraph
 
Reported: 2010-08-27 00:36 UTC by Robin Sheat
Modified: 2014-06-25 01:29 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Sheat 2010-08-27 00:36:14 UTC
In Members.pm, GetMember and GetMemberDetails do almost the same thing. This common behaviour should be combined so that changes to this kind of thing don't have to happen in multiple places.

Aiming for 3.4.
Comment 1 Ian Walls 2011-10-18 22:20:17 UTC
GetMember is VASTLY more efficient that GetMemberDetails.  For almost all purposes, GetMember is sufficient.  For those rare occasions when you need more than what's in the borrower table, then use GetMemberDetails.  But outside of the patron details pages, that should not be necessary.

GetMemberDetails calls GetMemberAccountRecords and patronflags.

GetMemberAccountRecords calls GetBiblioFromItemNumber for EVERY accountlines entry that has a borrowernumber.

patronflags calls GetMemberAccountRecords (!), checkoverdues, and GetReservesFromBorrowernumber.

checkoverdues does a join across biblio, biblioitems, items and issues

GetReservesFromBorrowernumber is relatively benign.


In any situation where more than a single borrowernumber per pageload is provided to GetMemberDetails, this gets to be a huge waste of resources.  Either we need to completely rebuild these subroutines to be more efficient, or make sure GetMemberDetails is only used when absolutely necessary.