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

set initial pool size higher, add found_depth return to search #3

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

c-andy-martin
Copy link

@c-andy-martin c-andy-martin commented Jan 31, 2024

This change is Reviewable

For new trees, set the initial pool allocation to 128 to get a larger
initial chunk and reduce the number of calls needed to the allocator.
For copied trees, set the initial pool size to the tree size we are
copying so only one initial allocation must be done.
Copy link

@bobhenz-jabil bobhenz-jabil left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @c-andy-martin, @howardcochran, and @travisariggs)


octomap/include/octomap/OcTreeBaseImpl.hxx line 533 at r2 (raw file):

        if (!nodeHasChildren(curNode)) { // TODO similar check to nodeChildExists?
          if (found_depth) {
            assert(current_depth < depth);

This assert seems odd to only have it run if the caller requested found_depth. Should this be moved outside of the "if"?

Add an optional found_depth return by pointer. If the found_depth
pointer is set, the depth the search stopped at will be set to what
found_depth points to. This way the caller can determine if the search
ended at the requested depth if that is important to the caller.
Copy link
Author

@c-andy-martin c-andy-martin left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @bobhenz-jabil, @howardcochran, and @travisariggs)


octomap/include/octomap/OcTreeBaseImpl.hxx line 533 at r2 (raw file):

Previously, bobhenz-jabil (Bob Henz) wrote…

This assert seems odd to only have it run if the caller requested found_depth. Should this be moved outside of the "if"?

fixed.

@c-andy-martin c-andy-martin merged commit 4d2b0de into badger-develop Feb 2, 2024
0 of 9 checks passed
@c-andy-martin c-andy-martin deleted the initial-pool-size branch February 2, 2024 14:56
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