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

Initial counter_cache implementation #393

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ekampp
Copy link

@ekampp ekampp commented Dec 21, 2021

This implements a counter_cache option, which is passed to the parent relationship. This allows closure tree structures to use tag.tags_count rather than tag.children.count. This is much faster for large data sets, where counts are prohibitively slow.

TODO

  • Sufficient performance
  • Sufficient tests
  • Write documentation for the feature

I would love the maintainers comments on the three TODO items above, to make sure that this PR doesn't break anything, and brings good enough performance and documentation.

Thanks,
Emil

@ekampp
Copy link
Author

ekampp commented Dec 21, 2021

This sort of picks up where #109 left off. But it's re-implemented from scratch.

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.

1 participant