[Bug 41444] New: Fetch transfers directly for search results
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 Bug ID: 41444 Summary: Fetch transfers directly for search results Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Searching Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org When processing items for display in search Results we fetch the item object and call get_transfers When maxItemsInSearchResults is raised to a higher number, say 50, common in consortia to display correct info for many branches this can have a large impact on search speed. Ultimately, perhaps, we should index the transfer status, but it seems to benefit us to fetch the transfers directly here as we don't use the object for anything else at this point in the code. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 --- Comment #1 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 190469 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190469&action=edit Bug 41444: Search for transfers directly This patch removes a fetch of the item object followed but get_transfer to simply search the transfers by itemnumber and status To test: 1 - Add many items to your records https://github.com/kidclamp/handy-koha-script/blob/main/randitems.pl NOTE: this script makes a lot of items withdrawn or damaged, undo that for more dramatic difference UPDATE items SET withdrawn=0,damaged=0 perl misc/search_tools/rebuild_elasticsearch -v 2 - Set Koha system preferences to display more results and check more items: maxItemsInSearchResults 60 numSearchResults 50 3 - Do a search, several times, note the time it takes 4 - Apply patch, restart all 5 - Repeat search several times, note the time it takes 6 - Confirm it is better after the patch -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190469|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 190474 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=190474&action=edit Bug 41444: Search for transfers directly This patch removes a fetch of the item object followed but get_transfer to simply search the transfers by itemnumber and status To test: 1 - Add many items to your records https://github.com/kidclamp/handy-koha-script/blob/main/randitems.pl NOTE: this script makes a lot of items withdrawn or damaged, undo that for more dramatic difference UPDATE items SET withdrawn=0,damaged=0 perl misc/search_tools/rebuild_elasticsearch -v 2 - Set Koha system preferences to display more results and check more items: maxItemsInSearchResults 60 numSearchResults 50 3 - Do a search, several times, note the time it takes 4 - Apply patch, restart all 5 - Repeat search several times, note the time it takes 6 - Confirm it is better after the patch Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 --- Comment #3 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Adding a mention that this syspref controls how many items are checked and should be raised as well during testing MaxSearchResultsItemsPerRecordStatusCheck -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #190474|0 |1 is obsolete| | --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 194091 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194091&action=edit Bug 41444: Search for transfers directly This patch removes a fetch of the item object followed but get_transfer to simply search the transfers by itemnumber and status To test: 1 - Add many items to your records https://github.com/kidclamp/handy-koha-script/blob/main/randitems.pl NOTE: this script makes a lot of items withdrawn or damaged, undo that for more dramatic difference UPDATE items SET withdrawn=0,damaged=0 perl misc/search_tools/rebuild_elasticsearch -v 2 - Set Koha system preferences to display more results and check more items: maxItemsInSearchResults 60 numSearchResults 50 3 - Do a search, several times, note the time it takes 4 - Apply patch, restart all 5 - Repeat search several times, note the time it takes 6 - Confirm it is better after the patch Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 194092 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194092&action=edit Bug 41444: (QA follow-up) Rearrange comments It would be at least helpful to add a reference to get_transfer here, since we are replacing it here. Used the opportunity to update the older comments Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Wouldnt object to moving status to enh btw. Bit arbitrary.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|26.05.00 |26.05.00,25.11.04 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 --- Comment #8 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|26.05.00,25.11.04 |26.05.00,25.11.04,25.05.11 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 --- Comment #9 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.05.09 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 --- Comment #10 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Correction: this was pushed for 25.05.11. --LE -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41444 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00,25.11.04,25.05.11 |26.05.00,25.11.04,25.05.11, released in| |24.11.16 CC| |baptiste.wojtkowski@biblibr | |e.com Status|Pushed to oldstable |Needs documenting --- Comment #11 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Pushed into 24.11.x for 24.11.16 nice work everyone -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org