-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
core: optimize list applications #18330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #18330 +/- ##
==========================================
- Coverage 92.98% 92.57% -0.41%
==========================================
Files 894 894
Lines 48919 48938 +19
==========================================
- Hits 45486 45306 -180
- Misses 3433 3632 +199
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
| # qs = qs.select_related(f"provider__{subclass}__backchannel_application") | ||
| # qs = qs.select_related(f"provider__{subclass}__authentication_flow") | ||
| # qs = qs.select_related(f"provider__{subclass}__authorization_flow") | ||
| # qs = qs.select_related(f"provider__{subclass}__invalidation_flow") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # qs = qs.select_related(f"provider__{subclass}__backchannel_application") | |
| # qs = qs.select_related(f"provider__{subclass}__authentication_flow") | |
| # qs = qs.select_related(f"provider__{subclass}__authorization_flow") | |
| # qs = qs.select_related(f"provider__{subclass}__invalidation_flow") |
… and access to a lot of applications
b8197e7 to
2e6cb78
Compare
Attempt at optimizing applications api for users with a lot of groups and access to a lot of applications
Details
In my testing, the
prefetch_relatedandselect_relatedand modifications to thelist()applications functions all brought moderate improvements. However, the caching of the user data instead of serializing the user again for each timeget_launch_urlis called brought massive improvements. Old behavior was 10s+ for a page of 100 applications and with all of these changes combined the new performance is 1-2sChecklist
ak test authentik/)make lint-fix)If an API change has been made
make gen-build)If changes to the frontend have been made
make web)If applicable
make docs)