Bug 35702 - Reduce DB calls when performing authorities merge
Summary: Reduce DB calls when performing authorities merge
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens (kidclamp)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-04 15:13 UTC by Nick Clemens (kidclamp)
Modified: 2024-02-02 16:31 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.02,23.05.09


Attachments
Bug 35702: Use framework code from biblio object (1.04 KB, patch)
2024-01-04 15:15 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 35702: Fetch biblios at once and loop (1.34 KB, patch)
2024-01-04 15:15 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 35702: Use framework code from biblio object (1.08 KB, patch)
2024-01-06 18:30 UTC, David Nind
Details | Diff | Splinter Review
Bug 35702: Fetch biblios at once and loop (1.38 KB, patch)
2024-01-06 18:30 UTC, David Nind
Details | Diff | Splinter Review
Bug 35702: Use framework code from biblio object (1.16 KB, patch)
2024-01-12 09:04 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 35702: Fetch biblios at once and loop (1.58 KB, patch)
2024-01-12 09:04 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2024-01-04 15:13:09 UTC
We are individually fetching each biblio, we can do this in a single call

We also fetch the frameworkcode from the DB for each biblio - we can just use the field from the object we have already fetched
Comment 1 Nick Clemens (kidclamp) 2024-01-04 15:15:15 UTC
Created attachment 160537 [details] [review]
Bug 35702: Use framework code from biblio object
Comment 2 Nick Clemens (kidclamp) 2024-01-04 15:15:17 UTC
Created attachment 160538 [details] [review]
Bug 35702: Fetch biblios at once and loop

Test plan:
prove -v t/db_dependent/Authority/Merge.t
Comment 3 David Nind 2024-01-06 18:30:05 UTC
Created attachment 160596 [details] [review]
Bug 35702: Use framework code from biblio object

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2024-01-06 18:30:07 UTC
Created attachment 160597 [details] [review]
Bug 35702: Fetch biblios at once and loop

Test plan:
prove -v t/db_dependent/Authority/Merge.t

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Jonathan Druart 2024-01-12 09:04:43 UTC
Created attachment 160900 [details] [review]
Bug 35702: Use framework code from biblio object

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Jonathan Druart 2024-01-12 09:04:46 UTC
Created attachment 160901 [details] [review]
Bug 35702: Fetch biblios at once and loop

Test plan:
prove -v t/db_dependent/Authority/Merge.t

Signed-off-by: David Nind <david@davidnind.com>

Amended-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Replace $biblio->id with $biblio->biblionumber

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Jonathan Druart 2024-01-12 09:04:57 UTC
I have replaced $biblio->id with $biblio->biblionumber.
I don't think we should add confusion (especially for newcomers) and use both id and biblionumber.

If we want to move to id we can have a vote and decide. But that's not a discussion for here nor now.
Comment 8 Katrin Fischer 2024-01-16 11:09:41 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 9 Fridolin Somers 2024-01-17 09:25:45 UTC
Pushed to 23.11.x for 23.11.02
Comment 10 Lucas Gass 2024-02-02 16:31:38 UTC
Backported to 23.05.x for upcoming 23.05.09