Skip to content

Conversation

@joaocfernandes
Copy link

Details

Fetch only fields needed by PartialUserSerializer, avoiding unnecessary column fetching

In a local example this reduces database load and object instantiation time by ~30%.

Combined with #18446 , for huge user numbers in a local setup we were able to have significant performance gains, from around 1.3s to about 600ms.


Checklist

  • Local tests pass (ak test authentik/)
  • The code has been formatted (make lint-fix)

If an API change has been made

  • The API schema has been updated (make gen-build)

If changes to the frontend have been made

  • The code has been formatted (make web)

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make docs)

- Use .only() on users prefetch to fetch only fields needed by
  PartialUserSerializer, avoiding unnecessary column fetching
@joaocfernandes joaocfernandes requested a review from a team as a code owner November 29, 2025 11:21
@netlify
Copy link

netlify bot commented Nov 29, 2025

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit a862121
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/692ad72dd0233500087e2a8d
😎 Deploy Preview https://deploy-preview-18448--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Nov 29, 2025

Deploy Preview for authentik-integrations ready!

Name Link
🔨 Latest commit a862121
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/692ad72d6541230008dba037
😎 Deploy Preview https://deploy-preview-18448--authentik-integrations.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant