Skip to content

PERF: fixes N+1 for automation plugin #32810

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

Merged
merged 3 commits into from
May 20, 2025
Merged

PERF: fixes N+1 for automation plugin #32810

merged 3 commits into from
May 20, 2025

Conversation

jjaffeux
Copy link
Contributor

@jjaffeux jjaffeux commented May 20, 2025

  • Add a safeguard until we implement pagination for the index, it ensures we won't try to load more than 500 automations ever.
  • Includes the fields of the automation so we don't have an N+1 and also filter them in ruby land instead of doing two additional queries
  • Ensures a field object in the field serializer is capable to find the loaded automation associated to it instead of trying to reload it
  • Includes pending_automations to avoid an N+1

- Add a safeguard until we implement pagination for the index, it ensures we won't try to load more than 500 automations ever.
- Includes the fields of the automation so we don't an N+1 and also filter them in ruby land instead of doing two additional queries
- Ensures a field object in the field serializer is capable to find the loaded automation associated to it instead of trying to reload it
- Includes pending_automations
@lis2
Copy link
Contributor

lis2 commented May 20, 2025

🚀

@github-actions github-actions bot added the i18n PRs which update English locale files or i18n related code label May 20, 2025
@jjaffeux jjaffeux merged commit 4c9384e into main May 20, 2025
18 checks passed
@jjaffeux jjaffeux deleted the perf-automation branch May 20, 2025 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n PRs which update English locale files or i18n related code
Development

Successfully merging this pull request may close these issues.

2 participants