[Bug 36441] New: Improve performance of Item::is_bundle
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36441 Bug ID: 36441 Summary: Improve performance of Item::is_bundle Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: glasklas@gmail.com QA Contact: testopia@bugs.koha-community.org For a biblio with a large number of holdings (which could be the case for serials for example) Item::is_bundle is one of the main culprits in terms of performance. I know it's usually frowned upon substituting DBIx queries with the DBI-equivalent, but think there are few other option in this case and should be very unlikely to cause any future regressions. Attached before and after flamegraphs to illustrate the difference in performance. -- 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=36441 --- Comment #1 from David Gustafsson <glasklas@gmail.com> --- Created attachment 164023 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164023&action=edit Before -- 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=36441 --- Comment #2 from David Gustafsson <glasklas@gmail.com> --- Created attachment 164024 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164024&action=edit After -- 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=36441 --- Comment #3 from David Gustafsson <glasklas@gmail.com> --- Created attachment 164025 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164025&action=edit Bug 36441: Improve performance of Item::is_bundle Perform count using DBI-query in Item::is_bundle to significantly improve performance. To test: 1) Go to the details page of a bibio with a large number of holdings holdings, preferably more than a hundred, and take note of page load time. 3) Apply patch 4) Reload the page and take note of page load time. 5) There should be an improvement of about 10-15% 6) Ensure tests in t/db_dependent/Koha/Item.t pass Sponsored-by: Gothenburg University Library -- 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=36441 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=36441 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |glasklas@gmail.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=36441 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #164025|0 |1 is obsolete| | --- Comment #4 from David Gustafsson <glasklas@gmail.com> --- Created attachment 164026 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164026&action=edit Bug 36441: Improve performance of Item::is_bundle Perform count using DBI-query in Item::is_bundle to significantly improve performance. To test: 1) Go to the details page of a bibio with a large number of holdings holdings, preferably more than a hundred, and take note of page load time. 3) Apply patch 4) Reload the page and take note of page load time. 5) There should be an improvement of about 10-15% 6) Ensure tests in t/db_dependent/Koha/Item.t pass Sponsored-by: Gothenburg University Library -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36441 --- Comment #5 from David Gustafsson <glasklas@gmail.com> --- Created attachment 164027 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164027&action=edit Bug 36441: Add comment explaining why replacing the DBIx call -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36441 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #6 from David Nind <david@davidnind.com> --- The patch still applies. Is this affected by or still relevant after Bug 33568 - Use the REST API to display items on the staff biblio detail view added to Koha 24.05? (I'm not a developer...) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36441 Thibault Keromnès <thibault.keromnes@univ-paris8.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |thibault.keromnes@univ-pari | |s8.fr --- Comment #7 from Thibault Keromnès <thibault.keromnes@univ-paris8.fr> --- I've tested with 175 items on a biblio and it's not enough to see a difference in the load time before and after the patch (the load time varies too much). We need to try with more items. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36441 Thibault Keromnès <thibault.keromnes@univ-paris8.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #8 from Thibault Keromnès <thibault.keromnes@univ-paris8.fr> --- To test : you can go to any biblio - new item - add multiple items, to create hundreds of them. Then on the biblio page you have to select "All" items so it (otherwise only 20 items will load) For 600 items, the network response times on 4 tests before applying : - 24434 ms - 23750 - 24062 - 24239 after applying : - 23233 ms - 23401 - 23593 - 23883 Can somebody see a difference in speed? As of now the test plan doesn't allow to find a difference, or there's isn't a real difference. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36441 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WONTFIX Status|Failed QA |RESOLVED --- Comment #9 from David Gustafsson <glasklas@gmail.com> ---
From what I can gather the is_bundle is no longer called in catalogue/details.pl. So even though the performance of is_bundle is increased by this patch, it is no longer used in a place where performance becomes an issue, so there is no longer any point of merging this.
-- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org