User/Role/Feature lookup improvements
Requires https://github.com/ManageIQ/manageiq/pull/20506
Makes use of new scopes to improve the number of queries required for login and even regular requests (though, the latter is less significant).
Also avoids some duplicate User lookups on login.
Benchmarks
Note: Improvements are in number of queries.
Before
$ bundle exec miqperf benchmark -ac2 "/api/users"
$ bundle exec miqperf report --last
/api/auth
| ms | queries | query (ms) | rows |
| ---: | ---: | ---: | ---: |
| 5088 | 26 | 183 | 10 |
/api/users
| ms | queries | query (ms) | rows |
| ---: | ---: | ---: | ---: |
| 267 | 12 | 13 | 1494 |
| 17 | 10 | 3.9 | 12 |
After
$ bundle exec miqperf benchmark -ac2 "/api/users"
$ bundle exec miqperf report --last
/api/auth
| ms | queries | query (ms) | rows |
| ---: | ---: | ---: | ---: |
| 4949 | 12 | 181 | 1 |
/api/users
| ms | queries | query (ms) | rows |
| ---: | ---: | ---: | ---: |
| 258 | 7 | 12 | 1489 |
| 15 | 5 | 3.3 | 7 |
Links
- https://github.com/ManageIQ/manageiq/pull/20506
- More improvements as part of this effort: https://github.com/ManageIQ/manageiq-api/issues/880
Looks like I have a lot of broken tests to fix... I will look into that today.
Edit: Actually, this needs a cross repo test for this to function, so will work on that at some point.
This pull request has been automatically marked as stale because it has not been updated for at least 3 months.
If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s)
Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.
This pull request has been automatically closed because it has not been updated for at least 3 months.
Feel free to reopen this pull request if these changes are still valid.
Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.
cc @kbrock
app/controllers/api/base_controller/authentication.rb
- [ ] :exclamation: - Line 93, Col 63 - Style/HashSyntax - Use hash rockets syntax.
This pull request has been automatically marked as stale because it has not been updated for at least 3 months.
If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s)
Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.
This pull request has been automatically marked as stale because it has not been updated for at least 3 months.
If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s).
This pull request has been automatically marked as stale because it has not been updated for at least 3 months.
If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s).
This pull request has been automatically marked as stale because it has not been updated for at least 3 months.
If these changes are still valid, please remove the stale label, make any changes requested by reviewers (if any), and ensure that this issue is being looked at by the assigned/reviewer(s).