Bug 7057

Summary: C4::Reserves::CheckReserves uses GetMemberDetails unnecessarily
Product: Koha Reporter: Ian Walls <koha.sekjal>
Component: Architecture, internals, and plumbingAssignee: Ian Walls <koha.sekjal>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: minor    
Priority: PATCH-Sent (DO NOT USE) CC: chris, nengard
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 7058    
Attachments: Proposed patch
[SIGNED-OFF] Bug 7057: CheckReserves uses GetMemberDetails unnecessarily

Description Ian Walls 2011-10-18 21:53:52 UTC
CheckReserves, which is a workhorse subroutine, calls GetMemberDetails possibly MANY times during it's execution (for each reserve on a biblio).  All it uses from this call is branchcode.  This is massively inefficient at large scales.

Replacing this with GetMember would be much, much more efficient.
Comment 1 Ian Walls 2011-10-18 21:58:11 UTC Comment hidden (obsolete)
Comment 2 Nicole C. Engard 2011-10-19 19:42:18 UTC
Created attachment 5993 [details] [review]
[SIGNED-OFF] Bug 7057: CheckReserves uses GetMemberDetails unnecessarily

Replaces call to GetMemberDetails with a call to GetMember.  Much more efficient,
and since only branchcode is used, no required data is lost.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Comment 3 Ian Walls 2011-10-19 22:17:35 UTC
Also marking as Passed QA, for RM's discretion to integrate
Comment 4 Chris Cormack 2011-10-20 01:06:33 UTC
Pushed, please test
Comment 5 Jared Camins-Esakov 2012-12-31 00:06:49 UTC
There have been no further reports of problems so I am marking this bug resolved.