Bug 32377 - GetBudgetHierarchy slows down acqui/histsearch.pl
Summary: GetBudgetHierarchy slows down acqui/histsearch.pl
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Emmi Takkinen
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-30 10:18 UTC by Emmi Takkinen
Modified: 2024-01-29 10:43 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.03,22.05.10, 21.11.16


Attachments
Bug 32377: Set param skiptotals on call of GetBudgetHierarchy in acqui/histsearch.pl (1.32 KB, patch)
2022-11-30 10:34 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 32377: Set param skiptotals on call of GetBudgetHierarchy in acqui/histsearch.pl (1.46 KB, patch)
2022-12-30 07:23 UTC, Frédéric Demians
Details | Diff | Splinter Review
Bug 32377: Set param skiptotals on call of GetBudgetHierarchy in acqui/histsearch.pl (1.51 KB, patch)
2023-01-30 23:47 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Emmi Takkinen 2022-11-30 10:18:30 UTC
Like in bug 30359, when acqui/histsearch.pl is opened and there are lot of budgets, loading the page takes a long time. Bug 30359 added parameter skiptotals to GetBudgetHierarchy. We should set this parameter also to call of GetBudgetHierarchy in acqui/histsearch.pl.
Comment 1 Emmi Takkinen 2022-11-30 10:34:37 UTC
Created attachment 144343 [details] [review]
Bug 32377: Set param skiptotals on call of GetBudgetHierarchy in acqui/histsearch.pl

Calling GetBudgetHierarchy from acqui/histsearch.pl
is slow if param skiptotals is not used.

To test:
1. Open browsers Console -> Network (F12).
2. Navigate to Order search page and perform search.
=> Take a note how long it takes to load the Search results page.
3. Apply this patch.
4. Repeat step 2.
=> Page should now load faster.

Sponsored-by: Koha-Suomi Oy
Comment 2 Frédéric Demians 2022-12-30 07:23:17 UTC
Created attachment 144891 [details] [review]
Bug 32377: Set param skiptotals on call of GetBudgetHierarchy in acqui/histsearch.pl

Calling GetBudgetHierarchy from acqui/histsearch.pl
is slow if param skiptotals is not used.

To test:
1. Open browsers Console -> Network (F12).
2. Navigate to Order search page and perform search.
=> Take a note how long it takes to load the Search results page.
3. Apply this patch.
4. Repeat step 2.
=> Page should now load faster.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Comment 3 Katrin Fischer 2023-01-30 23:47:53 UTC
Created attachment 145837 [details] [review]
Bug 32377: Set param skiptotals on call of GetBudgetHierarchy in acqui/histsearch.pl

Calling GetBudgetHierarchy from acqui/histsearch.pl
is slow if param skiptotals is not used.

To test:
1. Open browsers Console -> Network (F12).
2. Navigate to Order search page and perform search.
=> Take a note how long it takes to load the Search results page.
3. Apply this patch.
4. Repeat step 2.
=> Page should now load faster.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Tomás Cohen Arazi 2023-01-31 14:08:15 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 5 Matt Blenkinsop 2023-02-01 15:19:37 UTC
Nice work everyone!

Pushed to stable for 22.11.x
Comment 6 Lucas Gass 2023-02-03 22:26:15 UTC
Backported to 22.05.x for upcoming 22.05.10
Comment 7 Arthur Suzuki 2023-02-17 09:59:45 UTC
applied to 21.11.x for 21.11.16
Comment 8 wainuiwitikapark 2023-03-15 01:43:14 UTC
Not backported to 21.05.x