Bug 23966 - Library transfer limits editor unusable for sites with many libraries and ccodes/itemtypes
Summary: Library transfer limits editor unusable for sites with many libraries and cco...
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-04 17:14 UTC by Kyle M Hall
Modified: 2021-12-13 21:10 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:


Attachments
Bug 23966 - Branch Transfer Limits editor unusable for sites with many libraries and ccodes/itemtypes (2.92 KB, patch)
2019-11-04 17:16 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 23966 - Branch Transfer Limits editor unusable for sites with many libraries and ccodes/itemtypes (2.95 KB, patch)
2020-02-21 20:53 UTC, Bouzid Fergani
Details | Diff | Splinter Review
Bug 23966 - Branch Transfer Limits editor unusable for sites with many libraries and ccodes/itemtypes (2.95 KB, patch)
2020-02-21 20:54 UTC, Bouzid Fergani
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2019-11-04 17:14:28 UTC
Right now the branch transfer limits editor works fine if an instance has a small number of libraries and ccodes/itemtypes, but for large consortia who may have over 100 branches and ccodes/itemtypes, the editor page can take literal minutes to load ( we have partners where the page load time is 7-8 minutes ).

This is because we run a separate database query for each limit. We should use a single query to find all the limits for this page.
Comment 1 Kyle M Hall 2019-11-04 17:16:57 UTC
Created attachment 95024 [details] [review]
Bug 23966 - Branch Transfer Limits editor unusable for sites with many libraries and ccodes/itemtypes

Right now the branch transfer limits editor works fine if an instance has a small number of libraries
and ccodes/itemtypes, but for large consortia who may have over 100 branches and ccodes/itemtypes,
the editor page can take literal minutes to load ( we have partners where the page load time is 7-8 minutes ).

This is because we run a separate database query for each limit. We should use a single query to find all the limits for this page.

Test Plan:
1) Enable BranchTransferLimits
2) Create some limits, test adding and removing limits
3) Apply this patch
4) Restart all the things!
5) Reload the page, you should see the same limits in place as before
6) Test adding and removing limits, everything should behave the same
   as it did before the patch was applied!
Comment 2 Kyle M Hall 2019-11-04 17:19:25 UTC
FYI, for one partner this patch reduced the load time from 8 minutes to 8 seconds!
Comment 3 Bouzid Fergani 2020-02-21 20:53:36 UTC
Created attachment 99442 [details] [review]
Bug 23966 - Branch Transfer Limits editor unusable for sites with many libraries and ccodes/itemtypes

Right now the branch transfer limits editor works fine if an instance has a small number of libraries
and ccodes/itemtypes, but for large consortia who may have over 100 branches and ccodes/itemtypes,
the editor page can take literal minutes to load ( we have partners where the page load time is 7-8 minutes ).

This is because we run a separate database query for each limit. We should use a single query to find all the limits for this page.

Test Plan:
1) Enable BranchTransferLimits
2) Create some limits, test adding and removing limits
3) Apply this patch
4) Restart all the things!
5) Reload the page, you should see the same limits in place as before
6) Test adding and removing limits, everything should behave the same
   as it did before the patch was applied!

Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Comment 4 Bouzid Fergani 2020-02-21 20:54:34 UTC
Created attachment 99443 [details] [review]
Bug 23966 - Branch Transfer Limits editor unusable for sites with many libraries and ccodes/itemtypes

Right now the branch transfer limits editor works fine if an instance has a small number of libraries
and ccodes/itemtypes, but for large consortia who may have over 100 branches and ccodes/itemtypes,
the editor page can take literal minutes to load ( we have partners where the page load time is 7-8 minutes ).

This is because we run a separate database query for each limit. We should use a single query to find all the limits for this page.

Test Plan:
1) Enable BranchTransferLimits
2) Create some limits, test adding and removing limits
3) Apply this patch
4) Restart all the things!
5) Reload the page, you should see the same limits in place as before
6) Test adding and removing limits, everything should behave the same
   as it did before the patch was applied!

Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Comment 5 Jonathan Druart 2020-02-24 09:54:07 UTC
That does not work.

To replicate:
uncheck first checkbox from tab 1
uncheck second checkbox from tab 2
uncheck third checkbox from tab 3
save
third first checkboxes are unchecked from all 3 tabs
Comment 6 Jonathan Druart 2020-02-24 09:54:23 UTC
Also please fix commit title.