[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-07-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

Nick Clemens  changed:

   What|Removed |Added

   Keywords||rel_21_11_candidate

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-07-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

--- Comment #17 from Nick Clemens  ---
Created attachment 138058
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=138058&action=edit
Bug 30085: [21.11.x] Reduce scope of holds count / today holds count

We retrieve two counts that are only needed if rules for hold limits are
defined.
The DB counts should only be fetched once the rules are confirmed to exist

Further improvement would be possiblke by allowing them to be passed in (or
cached?)
from CanBookBeReserved as they rely only on patron/biblionumber and not item
specific information

Signed-off-by: Martin Renvoize 

Signed-off-by: Jonathan Druart 

Bug 30085: Don't fetch ReservesControlBranch twice

We essentially copy the code from GetReservesControlBranch here, because we
also calculate 'branchfield'

Setting it to "" vs undef makes no difference in this code, so lets not fetch
this
again later.

Rename the variable to make it clearer where the branchcode came from

Signed-off-by: Martin Renvoize 

Signed-off-by: Jonathan Druart 

Bug 30085: Consolidate querycoutn code and only check if needed

Similar to first patch, move a count only conditionally used into
the conditional

This could be updated to use DBIC, but the itemtype conditionals
add complexity

Signed-off-by: Martin Renvoize 

Signed-off-by: Jonathan Druart 

Bug 30085: Move IndependentBranches check sooner

This doesn't rely on the other statuses, and requires only cached
preference check, so lets allow the possibiliy of an early exit

Signed-off-by: Martin Renvoize 

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-04-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

--- Comment #16 from Kyle M Hall  ---
(In reply to Nick Clemens from comment #15)
> Consider for backport?

Sure! Can you rebase against 21.11.x?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-03-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

Nick Clemens  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #15 from Nick Clemens  ---
Consider for backport?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

Nick Clemens  changed:

   What|Removed |Added

   Severity|enhancement |normal

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

Kyle M Hall  changed:

   What|Removed |Added

 Status|Pushed to master|RESOLVED
 Resolution|--- |FIXED
 CC||k...@bywatersolutions.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

--- Comment #14 from Fridolin Somers  ---
Pushed to master for 22.05, thanks to everybody involved 🦄

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

Fridolin Somers  changed:

   What|Removed |Added

 Version(s)||22.05.00
released in||
 Status|Passed QA   |Pushed to master

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

Fridolin Somers  changed:

   What|Removed |Added

 Blocks||7923
 CC||fridolin.som...@biblibre.co
   ||m


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7923
[Bug 7923] Performance omnibus
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

Jonathan Druart  changed:

   What|Removed |Added

   Patch complexity|Trivial patch   |Medium patch

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

--- Comment #13 from Jonathan Druart  ---
Created attachment 130859
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130859&action=edit
Bug 30085: Move IndependentBranches check sooner

This doesn't rely on the other statuses, and requires only cached
preference check, so lets allow the possibiliy of an early exit

Signed-off-by: Martin Renvoize 

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

--- Comment #12 from Jonathan Druart  ---
Created attachment 130858
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130858&action=edit
Bug 30085: Consolidate querycoutn code and only check if needed

Similar to first patch, move a count only conditionally used into
the conditional

This could be updated to use DBIC, but the itemtype conditionals
add complexity

Signed-off-by: Martin Renvoize 

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

--- Comment #11 from Jonathan Druart  ---
Created attachment 130857
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130857&action=edit
Bug 30085: Don't fetch ReservesControlBranch twice

We essentially copy the code from GetReservesControlBranch here, because we
also calculate 'branchfield'

Setting it to "" vs undef makes no difference in this code, so lets not fetch
this
again later.

Rename the variable to make it clearer where the branchcode came from

Signed-off-by: Martin Renvoize 

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #130829|0   |1
is obsolete||
 Attachment #130830|0   |1
is obsolete||
 Attachment #130831|0   |1
is obsolete||
 Attachment #130832|0   |1
is obsolete||

--- Comment #10 from Jonathan Druart  ---
Created attachment 130856
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130856&action=edit
Bug 30085: Reduce scope of holds count / today holds count

We retrieve two counts that are only needed if rules for hold limits are
defined.
The DB counts should only be fetched once the rules are confirmed to exist

Further improvement would be possiblke by allowing them to be passed in (or
cached?)
from CanBookBeReserved as they rely only on patron/biblionumber and not item
specific information

Signed-off-by: Martin Renvoize 

Signed-off-by: Jonathan Druart 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

Jonathan Druart  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

Martin Renvoize  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

--- Comment #9 from Martin Renvoize  ---
Code is clearer to read and all the unit tests that call this function are
still passing.

I've not actually tested performance directly, but the changes all make sense
to me as improvements.

Signing off.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #130528|0   |1
is obsolete||

--- Comment #8 from Martin Renvoize  ---
Created attachment 130832
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130832&action=edit
Bug 30085: Move IndependentBranches check sooner

This doesn't rely on the other statuses, and requires only cached
preference check, so lets allow the possibiliy of an early exit

Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #130527|0   |1
is obsolete||

--- Comment #7 from Martin Renvoize  ---
Created attachment 130831
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130831&action=edit
Bug 30085: Consolidate querycoutn code and only check if needed

Similar to first patch, move a count only conditionally used into
the conditional

This could be updated to use DBIC, but the itemtype conditionals
add complexity

Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #130526|0   |1
is obsolete||

--- Comment #6 from Martin Renvoize  ---
Created attachment 130830
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130830&action=edit
Bug 30085: Don't fetch ReservesControlBranch twice

We essentially copy the code from GetReservesControlBranch here, because we
also calculate 'branchfield'

Setting it to "" vs undef makes no difference in this code, so lets not fetch
this
again later.

Rename the variable to make it clearer where the branchcode came from

Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-18 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

Martin Renvoize  changed:

   What|Removed |Added

 Attachment #130525|0   |1
is obsolete||

--- Comment #5 from Martin Renvoize  ---
Created attachment 130829
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130829&action=edit
Bug 30085: Reduce scope of holds count / today holds count

We retrieve two counts that are only needed if rules for hold limits are
defined.
The DB counts should only be fetched once the rules are confirmed to exist

Further improvement would be possiblke by allowing them to be passed in (or
cached?)
from CanBookBeReserved as they rely only on patron/biblionumber and not item
specific information

Signed-off-by: Martin Renvoize 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

Nick Clemens  changed:

   What|Removed |Added

   Assignee|koha-b...@lists.koha-commun |n...@bywatersolutions.com
   |ity.org |
 CC||jonathan.druart+koha@gmail.
   ||com,
   ||martin.renvoize@ptfs-europe
   ||.com, tomasco...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

--- Comment #4 from Nick Clemens  ---
Created attachment 130528
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130528&action=edit
Bug 30085: Move IndependentBranches check sooner

This doesn't rely on the other statuses, and requires only cached
preference check, so lets allow the possibiliy of an early exit

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

--- Comment #3 from Nick Clemens  ---
Created attachment 130527
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130527&action=edit
Bug 30085: Consolidate querycoutn code and only check if needed

Similar to first patch, move a count only conditionally used into
the conditional

This could be updated to use DBIC, but the itemtype conditionals
add complexity

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

--- Comment #2 from Nick Clemens  ---
Created attachment 130526
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130526&action=edit
Bug 30085: Don't fetch ReservesControlBranch twice

We essentially copy the code from GetReservesControlBranch here, because we
also calculate 'branchfield'

Setting it to "" vs undef makes no difference in this code, so lets not fetch
this
again later.

Rename the variable to make it clearer where the branchcode came from

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

--- Comment #1 from Nick Clemens  ---
Created attachment 130525
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130525&action=edit
Bug 30085: Reduce scope of holds count / today holds count

We retrieve two counts that are only needed if rules for hold limits are
defined.
The DB counts should only be fetched once the rules are confirmed to exist

Further improvement would be possiblke by allowing them to be passed in (or
cached?)
from CanBookBeReserved as they rely only on patron/biblionumber and not item
specific information

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 30085] Improve performance of CanItemBeReserved

2022-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30085

Nick Clemens  changed:

   What|Removed |Added

   Patch complexity|--- |Trivial patch
 Status|NEW |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/