Bugzilla – Attachment 183676 Details for
Bug 36155
Improve perfs of suggestion.pl when there are many budgets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36155: Improve perfs of suggestion.pl when there are many budgets
Bug-36155-Improve-perfs-of-suggestionpl-when-there.patch (text/plain), 1.28 KB, created by
Fridolin Somers
on 2025-07-01 16:25:36 UTC
(
hide
)
Description:
Bug 36155: Improve perfs of suggestion.pl when there are many budgets
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2025-07-01 16:25:36 UTC
Size:
1.28 KB
patch
obsolete
>From 8ebc176663eac9767012d0925e51aaeb7c5f832c Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Fri, 23 Feb 2024 08:59:30 +0100 >Subject: [PATCH] Bug 36155: Improve perfs of suggestion.pl when there are many > budgets > >Page suggestion/suggestion.pl calls CanUserUseBudget() in a loop, >will must use a uniq Koha::Patron object of the logged in user. >When there are many budgets and funds this takes some time. > >Test plan : >Compare performance with and without patch with many budgets and funds >(see test plan of Bug 35921) >--- > suggestion/suggestion.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl >index 39521c6495..fb639fcbec 100755 >--- a/suggestion/suggestion.pl >+++ b/suggestion/suggestion.pl >@@ -548,7 +548,7 @@ $template->param( patron_reason_loop => $patron_reason_loop ); > my $sugg_budget_loop = []; > my $sugg_budgets = GetBudgetHierarchy(); > foreach my $r ( @{$sugg_budgets} ) { >- next unless ( CanUserUseBudget( $borrowernumber, $r, $userflags ) ); >+ next unless ( CanUserUseBudget( $librarian->unblessed, $r, $userflags ) ); > my $selected = ( $$suggestion_ref{budgetid} && $r->{budget_id} eq $$suggestion_ref{budgetid} ) ? 1 : 0; > push @{$sugg_budget_loop}, > { >-- >2.43.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36155
:
162364
|
162371
| 183676