When you have 167 import batches and you try to pick one by going to acqui/addorderiso2709.pl, it takes ~16s to load the page. This is because all import_records are loaded simply to check if an import_batch has recors with the given status. This patch fixes this and cuts the load time to 1.6s
Created attachment 33314 [details] [review] Bug 13214 - Improve performance of acqui/addorderiso2709.pl, stop fetching all import_records needlessly TEST PLAN: 1. Load 167 staged files to Koha. 2. Try to make an acquisiton from a staged file. 3. Wait 16s for the acqui/addorderiso2709.pl -view to load. AFTER PATCH: 1. Load 167 staged files to Koha. 2. Try to make an acquisiton from a staged file. 3. Wait 1.6s for the acqui/addorderiso2709.pl -view to load.
Tested using Jonathan's excellent tutorial about Perl performace profiling! http://wiki.koha-community.org/wiki/Profiling_with_Devel::NYTProf
(In reply to Olli-Antti Kivilahti from comment #2) > Tested using Jonathan's excellent tutorial about Perl performace profiling! > > http://wiki.koha-community.org/wiki/Profiling_with_Devel::NYTProf It's not mine :)
Created attachment 33322 [details] [review] Bug 13214 - Improve performance of acqui/addorderiso2709.pl, stop fetching all import_records needlessly TEST PLAN: 1. Load 167 staged files to Koha. 2. Try to make an acquisiton from a staged file. 3. Wait 16s for the acqui/addorderiso2709.pl -view to load. AFTER PATCH: 1. Load 167 staged files to Koha. 2. Try to make an acquisiton from a staged file. 3. Wait 1.6s for the acqui/addorderiso2709.pl -view to load. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 33794 [details] [review] [PASSED QA] Bug 13214 - Improve performance of acqui/addorderiso2709.pl, stop fetching all import_records needlessly TEST PLAN: 1. Load 167 staged files to Koha. 2. Try to make an acquisiton from a staged file. 3. Wait 16s for the acqui/addorderiso2709.pl -view to load. AFTER PATCH: 1. Load 167 staged files to Koha. 2. Try to make an acquisiton from a staged file. 3. Wait 1.6s for the acqui/addorderiso2709.pl -view to load. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Patch pushed to master. Thanks Olli!