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.
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!
FYI, for one partner this patch reduced the load time from 8 minutes to 8 seconds!
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>
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>
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
Also please fix commit title.