Summary: | Improve performance of BatchCommitItems | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Architecture, internals, and plumbing | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | Joonas Kylmälä <joonas.kylmala> |
Severity: | normal | ||
Priority: | P5 - low | CC: | jonathan.druart, joonas.kylmala, martin.renvoize, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30822 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
22.11.00
|
|
Circulation function: | |||
Bug Depends on: | 30813 | ||
Bug Blocks: | |||
Attachments: |
Bug 30824: Improve performance of BatchCommitItems
Bug 30824: Improve performance of BatchCommitItems Bug 30824: (follow-up) POD Bug 30824: Improve performance of BatchCommitItems Bug 30824: (follow-up) POD |
Description
Nick Clemens (kidclamp)
2022-05-20 14:29:51 UTC
Created attachment 135247 [details] [review] Bug 30824: Improve performance of BatchCommitItems This makes two simple changes: - Limit TransformMarcToKoha to the fields we need - Pass forward the biblioitemnumber when adding items to a new biblionumber Profiling with NYTProf I saved ~8-9 seconds importing around 400 bibs/1000 items Reducing calls in item store to use a passed biblionumber was the largest gain. To test: 1 - Import some records and items 2 - Verify values etc., revert 3 - Apply patch 4 - Import again 5 - Verify values etc. same as before Created attachment 135307 [details] [review] Bug 30824: Improve performance of BatchCommitItems This makes two simple changes: - Limit TransformMarcToKoha to the fields we need - Pass forward the biblioitemnumber when adding items to a new biblionumber Profiling with NYTProf I saved ~8-9 seconds importing around 400 bibs/1000 items Reducing calls in item store to use a passed biblionumber was the largest gain. To test: 1 - Import some records and items 2 - Verify values etc., revert 3 - Apply patch 4 - Import again 5 - Verify values etc. same as before Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 135308 [details] [review] Bug 30824: (follow-up) POD Strong performance improvement, signing off. Created attachment 135369 [details] [review] Bug 30824: Improve performance of BatchCommitItems This makes two simple changes: - Limit TransformMarcToKoha to the fields we need - Pass forward the biblioitemnumber when adding items to a new biblionumber Profiling with NYTProf I saved ~8-9 seconds importing around 400 bibs/1000 items Reducing calls in item store to use a passed biblionumber was the largest gain. To test: 1 - Import some records and items 2 - Verify values etc., revert 3 - Apply patch 4 - Import again 5 - Verify values etc. same as before Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Created attachment 135370 [details] [review] Bug 30824: (follow-up) POD Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Makes the code harder to understand but I'll allow it due to the perf improvement. Passing QA. How does the dependency work, Nick? (In reply to Tomás Cohen Arazi from comment #8) > How does the dependency work, Nick? It comes from the updated call to TransformMarcToKoha - we could simply use 'items' in the limit_table param to remove it Blocked by tree. Blocking patch has been pushed now, setting back to PQA Pushed to master for 22.11. Nice work everyone, thanks! |