8000 Initial counter_cache implementation by ekampp · Pull Request #393 · ClosureTree/closure_tree · GitHub
[go: up one dir, main page]

Skip to content

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.

@clickworkorange
Copy link

This would be a welcome addition. Anything I can do to help make it happen?

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

0