Bug 15105

Summary: Batch Item Modification Performance Improvement
Product: Koha Reporter: cnorthcott.work
Component: ToolsAssignee: Galen Charlton <gmcharlt>
Status: CLOSED WONTFIX QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: katrin.fischer
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11051
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 7923    

Description cnorthcott.work 2015-11-02 00:36:11 UTC
Batch Item Modification has a fairly long run/load time. I have attempted to improve the runtime of the Batch Item Modification tool and my enhancement reduces the time to modify a batch of items by an average of 84.24%

I discovered the extended runtime was mostly due to the unoptimised cacheing of GetMarcStructure. I was able to save some time by using Memoize (http://search.cpan.org/~mjd/Memoize-1.01/Memoize.pm) to cache GetMarcStructure function calls using the same parameters, on top of the current caching system. In addition I was able to save a significant amount of time by decreasing the update rate of the progress bar which displays completeness of the process as items are modified.

In the end my test case of 986 items originally took 65.36 seconds after optimisation it took 10.3 seconds, saving 55.06 seconds.
Comment 1 cnorthcott.work 2015-11-06 08:02:59 UTC
I have removed the caching portion and will add it to a separate patch, this will have the effect of drastically reducing the direct improvement in this patch, but there is still value in the small non-cache improvements so I have opted to submit it here anyway :)
Comment 2 Katrin Fischer 2020-01-08 19:48:59 UTC
There has no code been submitted here and the codebase and caching methods have changed by a lot since this was posted. Closing WONTFIX.