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

⚡ [PERF] Optimize Path Aggregation query in detail view #4278

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ CHANGELOG
**Improvements**

- ApidaeTrekParser now imports all features from GPX
- Optimize path aggregations query in detail view

**Minor fixes**

Expand Down
2 changes: 1 addition & 1 deletion geotrek/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ def distance(self, to_cls):

@property
def aggregations_optimized(self):
return self.aggregations.all().select_related('path', 'topo_object')
return self.aggregations.all().select_related('path')


class PathAggregation(models.Model):
Expand Down
Loading