]> git.koha-community.org Git - koha.git/commit
Bug 30824: Improve performance of BatchCommitItems
authorNick Clemens <nick@bywatersolutions.com>
Fri, 20 May 2022 14:29:58 +0000 (14:29 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 13 Jun 2022 23:16:27 +0000 (20:16 -0300)
commitbb6be983d662cf15ecb29382cffaadfba56b2c79
treeada03bb25a14a99bfab910e66ce9390bd22bbfae
parent71a95d35574db31e21a6815fc696ee2b446c617e
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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
C4/ImportBatch.pm
C4/Items.pm