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

moving items within the tree? #82

Closed
seiyria opened this issue Mar 22, 2018 · 2 comments
Closed

moving items within the tree? #82

seiyria opened this issue Mar 22, 2018 · 2 comments

Comments

@seiyria
Copy link

seiyria commented Mar 22, 2018

hey! just found your library and I'm trying to figure out if it meets my needs. I have a game with moving creatures and I'm looking to optimize spatial searches, which this looks great at. One thing, though, is that creatures move around a lot, and I'm not sure how performant it would be to constantly remove/add the entry back into the tree. It could be theoretically 1000 times per second.

If it would still perform ok I'd be ok using it, but I'm not sure if there's a fast way to move something in an r-tree as opposed to adding/removing it.

@mourner
Copy link
Owner

mourner commented Mar 23, 2018

Try adding/removing — it may be fast enough for your needs. But if not, there's a proposal for a new API for this kind of things here: #28 (will close this issue as a duplicate)

@mourner mourner closed this as completed Mar 23, 2018
@seiyria
Copy link
Author

seiyria commented Mar 23, 2018

Sounds good, thanks for pointing me there. Some good reading. Like others, I'm not sure how good it will be or if it could be better, but anything beats my current approach. I'll have a try at implementing it as is.

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

No branches or pull requests

2 participants