Skip to content
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

Optimize get_audience by only fetching IDs #2839

Merged

Conversation

WesleyAC
Copy link
Member

Looking at the tracing data from this function in prod, only ~500ms is spent in the database. My best guess for the rest of the time is transferring and creating the user objects, which we don't use, since we simply need the ID.

Looking at the tracing data from this function in prod, only ~500ms is
spent in the database. My best guess for the rest of the time is
transferring and creating the user objects, which we don't use, since we
simply need the ID.
@jaschaurbach jaschaurbach requested a review from mouse-reeve May 11, 2023 14:30
@mouse-reeve mouse-reeve merged commit d6a321d into bookwyrm-social:main May 15, 2023
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.

2 participants