Koha/acqui
Julian Maurice b37e510eb8 Bug 35921: Improve perfs of acqui-home.pl when there are many budgets
When there are a lot of budgets with the same owner, most of the time of
acqui-home.pl is spent loading the same patron over and over.

This patch makes sure each borrower is loaded only once.

Test plan:
0. Do not apply the patch yet
1. Create a thousand budgets with the following command (make sure the
   budget_owner_id is an existing borrowernumber):
       perl -MKoha::Database -e '
           my $schema = Koha::Database->schema;
           my $period = $schema->resultset("Aqbudgetperiod")->create({
               budget_period_startdate => "2000-01-01",
               budget_period_enddate => "2999-12-31"
           });
           $schema->resultset("Aqbudget")->create({
               budget_owner_id => 1,
               budget_period_id => $period->id
           }) for (1..1000)
       '
2. Measure the time it takes to load acqui/acqui-home.pl (do it several
   times and keep the average time)
3. Apply the patch
4. Repeat step 2

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 24b33936a5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2024-03-21 11:06:05 +01:00
..
acqui-home.pl Bug 35921: Improve perfs of acqui-home.pl when there are many budgets 2024-03-21 11:06:05 +01:00
addorder.pl Bug 31631: (follow-up) Use CalculateFundValuesIncludingTax when modifying existing order 2023-10-18 15:41:35 -03:00
addorderiso2709.pl Bug 35892: Populate order price using GetMarcPrice if no price specified 2024-03-11 11:05:16 +01:00
ajax-getauthvaluedropbox.pl
basket.pl Bug 34752: (QA follow-up) perltidy 2023-10-18 10:25:55 -03:00
basketgroup.pl
basketheader.pl Bug 34509: Use select2 to load vendors on basket creation 2023-08-29 14:37:07 -03:00
booksellers.pl Bug 33103: Prevent vendors to be displayed several times in the search result 2023-04-20 15:48:42 -03:00
cancelorder.pl
check_budget_total.pl
check_uniqueness.pl
duplicate_orders.pl Bug 14092: (QA follow-up) Avoid fiddling with the hash in the template 2023-10-20 16:31:15 -03:00
edi_ean.pl
edifactmsgs.pl
edimsg.pl
finishreceive.pl Bug 34022: Adjust items data structure 2023-06-23 09:46:45 -03:00
histsearch.pl Bug 14092: (QA follow-up) Avoid fiddling with the hash in the template 2023-10-20 16:31:15 -03:00
invoice-files.pl
invoice.pl Bug 32705: Display the column if 1 order has an invoice price 2023-03-06 14:04:12 -03:00
invoices.pl Bug 36233: Use select2 to load vendors on invoice search 2024-03-18 09:57:08 +01:00
lateorders-export.pl
lateorders.pl Bug 33653: Use filter_by_active instead 2023-05-09 10:58:07 -03:00
moddeliverydate.pl
modordernotes.pl
neworderempty.pl Bug 34708: Add ability to modify orderline to increase quantity 2023-11-09 10:15:05 -03:00
newordersubscription.pl
newordersuggestion.pl
ordered.pl Bug 31631: Optionally use tax-exclusive values for calculating fund values 2023-10-18 15:41:35 -03:00
orderreceive.pl Bug 8179: Add vendor id on breadcrumb link 2023-05-17 14:44:42 -03:00
parcel.pl
parcels.pl
showorder.pl
spent.pl Bug 31631: (QA follow-up) Tidy code 2023-10-18 15:41:37 -03:00
supplier.pl Bug 33103: Add the ability to create vendor aliases 2023-04-20 15:48:36 -03:00
transferorder.pl
uncertainprice.pl
updatesupplier.pl Bug 33104: Add the ability to create vendor interfaces 2023-05-05 10:18:46 -03:00
vendor_issues.pl Bug 35634: (bug 33105 follow-up) fix typo issues_manage vs issue_manage 2024-01-15 15:22:24 +01:00
z3950_search.pl