[Bug 18861] New: branch_transfer_limits needs keys
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18861 Bug ID: 18861 Summary: branch_transfer_limits needs keys Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: System Administration Assignee: koha-bugs@lists.koha-community.org Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com The branch transfers limits are edited in : /cgi-bin/koha/admin/branch_transfer_limits.pl This page calls a loop on IsBranchTransferAllowed with all destination branches and codes (ccodes or itemtypes). This can takes a huge time because table branch_transfer_limits has no keys. -- 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=18861 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |fridolin.somers@biblibre.co |ity.org |m -- 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=18861 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |7923 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7923 [Bug 7923] Performance omnibus -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18861 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18861 --- Comment #1 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 64676 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64676&action=edit Bug 18861 - branch_transfer_limits needs keys The branch transfers limits are edited in : /cgi-bin/koha/admin/branch_transfer_limits.pl This page calls a loop on IsBranchTransferAllowed with all destination branches and codes (ccodes or itemtypes). This can takes a huge time because table branch_transfer_limits has no keys. Since ccode or itemtype may be used, this patch adds a key on both combinaison : ccode/fromBranch/toBranch and itemtype/fromBranch/toBranch. Tested on a table with 66000 entries, time whent from 26 second to less than 1 second. Test plan : - Go to Administration > Library transfer limits - Check page load is faster - Uncheck a checkbox - Save => Verify save is OK - Change branch and same tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18861 Alex Buckley <alexbuckley@catalyst.net.nz> 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=18861 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64676|0 |1 is obsolete| | --- Comment #2 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Created attachment 64764 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64764&action=edit Bug 18861 - branch_transfer_limits needs keys The branch transfers limits are edited in : /cgi-bin/koha/admin/branch_transfer_limits.pl This page calls a loop on IsBranchTransferAllowed with all destination branches and codes (ccodes or itemtypes). This can takes a huge time because table branch_transfer_limits has no keys. Since ccode or itemtype may be used, this patch adds a key on both combinaison : ccode/fromBranch/toBranch and itemtype/fromBranch/toBranch. Tested on a table with 66000 entries, time whent from 26 second to less than 1 second. Test plan : - Go to Administration > Library transfer limits - Check page load is faster - Uncheck a checkbox - Save => Verify save is OK - Change branch and same tests Followed test plan which worked as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18861 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alexbuckley@catalyst.net.nz Status|Signed Off |In Discussion --- Comment #3 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Hi Frindolin Your patch works well, one thing I noticed was that it would be logical for the checkbox of the current branch not to be displayed. i.e. if I am looking at the Fairfield checkin and transfer policy then the fairfield checkbox should not be displayed because when you uncheck the fairfield box then save the page it reloads with fairfield checked again. Perhaps this could be a future patch :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18861 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- What is the status of this bug? Signed off? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18861 --- Comment #5 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- (In reply to Alex Buckley from comment #3)
Perhaps this could be a future patch :) Indeed, another bug report.
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18861 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- Back to signed off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18861 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64764|0 |1 is obsolete| | --- Comment #7 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 114686 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114686&action=edit Bug 18861 - branch_transfer_limits needs keys The branch transfers limits are edited in : /cgi-bin/koha/admin/branch_transfer_limits.pl This page calls a loop on IsBranchTransferAllowed with all destination branches and codes (ccodes or itemtypes). This can takes a huge time because table branch_transfer_limits has no keys. Since ccode or itemtype may be used, this patch adds a key on both combinaison : ccode/fromBranch/toBranch and itemtype/fromBranch/toBranch. Tested on a table with 66000 entries, time whent from 26 second to less than 1 second. Test plan : - Go to Administration > Library transfer limits - Check page load is faster - Uncheck a checkbox - Save => Verify save is OK - Change branch and same tests Followed test plan which worked as intended Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18861 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Signed Off |Failed QA --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- I updated the patch, but in testing I didn't see any difference. I added many types and branches: INSERT INTO itemtypes (itemtype,description) SELECT CONCAT(itemtype,"A"),CONCAT(description,"A") FROM itemtypes; INSERT INTO itemtypes (itemtype,description) SELECT CONCAT(itemtype,"B"),CONCAT(description,"B") FROM itemtypes; INSERT INTO itemtypes (itemtype,description) SELECT CONCAT(itemtype,"C"),CONCAT(description,"C") FROM itemtypes; INSERT INTO itemtypes (itemtype,description) SELECT CONCAT(itemtype,"D"),CONCAT(description,"D") FROM itemtypes; INSERT INTO branches (branchcode,branchname,pickup_location) SELECT CONCAT(branchcode,"A"),CONCAT(branchname,"A"),pickup_location FROM branches; INSERT INTO branches (branchcode,branchname,pickup_location) SELECT CONCAT(branchcode,"B"),CONCAT(branchname,"B"),pickup_location FROM branches; INSERT INTO branches (branchcode,branchname,pickup_location) SELECT CONCAT(branchcode,"C"),CONCAT(branchname,"C"),pickup_location FROM branches; INSERT INTO branches (branchcode,branchname,pickup_location) SELECT CONCAT(branchcode,"D"),CONCAT(branchname,"D"),pickup_location FROM branches; Before and after the indexes it took about 30 seconds for the page to load -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18861 --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to Nick Clemens from comment #8)
I updated the patch, but in testing I didn't see any difference.
I added many types and branches: INSERT INTO itemtypes (itemtype,description) SELECT CONCAT(itemtype,"A"),CONCAT(description,"A") FROM itemtypes; INSERT INTO itemtypes (itemtype,description) SELECT CONCAT(itemtype,"B"),CONCAT(description,"B") FROM itemtypes; INSERT INTO itemtypes (itemtype,description) SELECT CONCAT(itemtype,"C"),CONCAT(description,"C") FROM itemtypes; INSERT INTO itemtypes (itemtype,description) SELECT CONCAT(itemtype,"D"),CONCAT(description,"D") FROM itemtypes; INSERT INTO branches (branchcode,branchname,pickup_location) SELECT CONCAT(branchcode,"A"),CONCAT(branchname,"A"),pickup_location FROM branches; INSERT INTO branches (branchcode,branchname,pickup_location) SELECT CONCAT(branchcode,"B"),CONCAT(branchname,"B"),pickup_location FROM branches; INSERT INTO branches (branchcode,branchname,pickup_location) SELECT CONCAT(branchcode,"C"),CONCAT(branchname,"C"),pickup_location FROM branches; INSERT INTO branches (branchcode,branchname,pickup_location) SELECT CONCAT(branchcode,"D"),CONCAT(branchname,"D"),pickup_location FROM branches;
Before and after the indexes it took about 30 seconds for the page to load
How many entries do you have in table branch_transfer_limits ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18861 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=26633 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18861 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|7923 | CC| |martin.renvoize@openfifth.c | |o.uk Blocks| |7923 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7923 [Bug 7923] Performance omnibus -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org