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

Skip building index when loading a tree from a file #171

Merged
merged 1 commit into from
May 15, 2022

Conversation

haraldF
Copy link
Contributor

@haraldF haraldF commented May 2, 2022

While benchmarking, it turned out that constructing a tree immediately
built its index. Calling loadIndex() afterwards did practically nothing.

This commit adds an enum to allow passing additional flags like
SkipInitialBuildIndex to allow loading a tree without the initial
index build. Greatly reduces startup time for large prebuilt trees.

@haraldF
Copy link
Contributor Author

haraldF commented May 2, 2022

Note - I haven't used nanoflann a lot, so I'm very open to change the name of the enum or its values

While benchmarking, it turned out that constructing a tree immediately
built its index. Calling loadIndex() afterwards did practically nothing.

This commit adds an enum to allow passing additional flags like
`SkipInitialBuildIndex` to allow loading a tree without the initial
index build. Greatly reduces startup time for large prebuilt trees.
@zarmars
Copy link

zarmars commented May 10, 2022

Couldn't agree more. Hopefully this fix can be merged soon!

@jlblancoc jlblancoc merged commit 42140d0 into jlblancoc:master May 15, 2022
@jlblancoc
Copy link
Owner

Thanks!

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.

3 participants