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

refactor: drop django-tree-queries & implement array-based tree functions #478

Conversation

winged
Copy link
Contributor

@winged winged commented Jun 13, 2024

The Django-Tree-Queries, together with some visibility queries, causes a ton of heavy performance problems. Therefore, we now implement the tree functionality for Scopes by using an array field to "cache" all the parent PKs of every scope.

This allows us to write some much more efficient queries that don't rely on CTEs, and enables subqueries where we previously had to explode a QS to perform the same functionality.

…ions

The Django-Tree-Queries, together with some visibility queries, causes
a ton of heavy performance problems. Therefore, we now implement the
tree functionality for Scopes by using an array field to "cache" all
the parent PKs of every scope.

This allows us to write some much more efficient queries that don't
rely on CTEs, and enables subqueries where we previously had to explode
a QS to perform the same functionality.
@winged winged force-pushed the fully_self_implemented_hierarchical_queries branch from 66c7afa to 30ed6c4 Compare June 13, 2024 11:40
Copy link
Member

@open-dynaMIX open-dynaMIX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work 🎉

@open-dynaMIX open-dynaMIX merged commit d6e6d88 into projectcaluma:main Jun 13, 2024
3 checks passed
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