Skip to content

[Feature Request]: fast flag cleanup function #17

@jay-herrera

Description

@jay-herrera

Currently, for the operations remove() and update(), there is the fast flag, which defers cleanup of empty subnodes. If I'm reading the docs correctly, the expectation is that remove/update would be called with the fast flag set to true for the entirety of one "batch" of cleanup, except the last one, where it would be set to false, and the cleanup of empty subnodes would happen all at once.

This is great if you know ahead of time how many removals that you're going to perform, but consider the case where inside of a loop, you conditionally remove an object from the tree. In that case, you don't know which removal will be the last one, so you can't easily determine which remove call should have the fast flag set to false.

This could be fixed if there was a cleanup() function, that you could run at the end of the loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions