Agency: Preload agency ancestors in the API to fix N+1 query#2576
Agency: Preload agency ancestors in the API to fix N+1 query#2576Tschuppi81 wants to merge 4 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
|
We probably have the same issue for the |
Agency: Preload agency ancestors in the API to fix N+1 query
Building the
htmllink of each agency renders its full path, which walks up the parent chain. Only the direct parent was eager loaded, so every ancestor above it was loaded with its own query. Preload the ancestor closure in bulk instead.TYPE: Performance
LINK: https://seantis-gmbh.sentry.io/issues/7426519446