Bug 32377

Summary: GetBudgetHierarchy slows down acqui/histsearch.pl
Product: Koha Reporter: Emmi Takkinen <emmi.takkinen>
Component: AcquisitionsAssignee: Emmi Takkinen <emmi.takkinen>
Status: RESOLVED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: normal    
Priority: P5 - low CC: arthur.suzuki, dcook, f.demians, lucas, martin.renvoize, wainuiwitikapark
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30359
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35921
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
Bug 32377: Set param skiptotals on call of GetBudgetHierarchy in acqui/histsearch.pl
Bug 32377: Set param skiptotals on call of GetBudgetHierarchy in acqui/histsearch.pl

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