Skip to content

Conversation

@jeremystretch
Copy link
Member

@jeremystretch jeremystretch commented May 26, 2021

Fixes: #6087

  • Ditch annotate_tree() PrefixQueryset method; replace with optional annotate_hierarchy()
  • Add depth and children fields on ipam.Prefix to cache depth and child counts
  • Add a second migration to efficiently update these values for existing deployments
  • Introduce signal receivers to automatically update these values on post_save and post_delete
  • Add get_parents() and get_children() convenience methods on ipam.Prefix

TODO

  • Management command to manually rebuild the prefix hierarchy
  • Extend depth and children query filters

@jeremystretch jeremystretch marked this pull request as ready for review May 27, 2021 19:45
@jeremystretch jeremystretch merged commit e95a973 into develop May 28, 2021
@jeremystretch jeremystretch deleted the 6087-prefix-depth-children branch May 28, 2021 12:37
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve performance when rendering the prefix hierarchy

2 participants