Summary: | ILL route unusable (slow) | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | REST API | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | major | ||
Priority: | P5 - low | CC: | andrew, fridolin.somers, jonathan.druart, kyle, martin.renvoize, nick, victor, wainuiwitikapark |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.11.00,21.05.05,20.11.11,20.05.17,19.11.23
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 22440 | ||
Attachments: |
Bug 29032: Pre-load ILL backends to speed up response
Bug 29032: Pre-load ILL backends to speed up response Bug 29032: Pre-load ILL backends to speed up response Bug 29032: Pre-load ILL backends to speed up response |
Description
Tomás Cohen Arazi (tcohen)
2021-09-15 15:02:40 UTC
Marking it RM_priority so it can be backported ASAP to stable branches once we are sure it works correctly. Created attachment 124899 [details] [review] Bug 29032: Pre-load ILL backends to speed up response Bug 22440 will rewrite the route and make it even more efficient by prefetching the related data instead of performing several queries in loops. In the meantime, we can make this controller perform better with a simple intervention: load backends once, and use the $request->_backend() setter to pre-set it before using the objects. To test: 1. Perform any usual ILL requests listing, try having several => FAIL: Notice it takes a weird amount of time to load 2. Apply this patch 3. Restart all 4. Repeat 1 => SUCCESS: It feels fast enough! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 124904 [details] [review] Bug 29032: Pre-load ILL backends to speed up response Bug 22440 will rewrite the route and make it even more efficient by prefetching the related data instead of performing several queries in loops. In the meantime, we can make this controller perform better with a simple intervention: load backends once, and use the $request->_backend() setter to pre-set it before using the objects. To test: 1. Perform any usual ILL requests listing, try having several => FAIL: Notice it takes a weird amount of time to load 2. Apply this patch 3. Restart all 4. Repeat 1 => SUCCESS: It feels fast enough! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Created attachment 124906 [details] [review] Bug 29032: Pre-load ILL backends to speed up response Bug 22440 will rewrite the route and make it even more efficient by prefetching the related data instead of performing several queries in loops. In the meantime, we can make this controller perform better with a simple intervention: load backends once, and use the $request->_backend() setter to pre-set it before using the objects. To test: 1. Perform any usual ILL requests listing, try having several => FAIL: Notice it takes a weird amount of time to load 2. Apply this patch 3. Restart all 4. Repeat 1 => SUCCESS: It feels fast enough! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Created attachment 125107 [details] [review] Bug 29032: Pre-load ILL backends to speed up response Bug 22440 will rewrite the route and make it even more efficient by prefetching the related data instead of performing several queries in loops. In the meantime, we can make this controller perform better with a simple intervention: load backends once, and use the $request->_backend() setter to pre-set it before using the objects. To test: 1. Perform any usual ILL requests listing, try having several => FAIL: Notice it takes a weird amount of time to load 2. Apply this patch 3. Restart all 4. Repeat 1 => SUCCESS: It feels fast enough! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Nice speed up here.. No regressions found PQA Pushed to master for 21.11, thanks to everybody involved! Pushed to 21.05.x for 21.05.05 Pushed to 20.11.x for 20.11.11 Backported: Pushed to 20.05.x branch for 20.05.17 Backported to 19.11.x for 19.11.23 |