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
R* Tree insertion performance #16
Comments
Thanks for the input! It's great to hear that spade has found usage in another project! Here are some ideas that might help you in your scenario:
|
I've tried out the z-order approach which was surprisingly easy thanks to the morton crate. It does increase performance significantly, but only for a very large number of points. In my test cases, only after inserting about ~50000 points it turned out to be faster. |
Thank you for working on this!
I should probably try to run some detailed benchmarks against Rbush, and also libspatialindex (which also has a bulk-insertion mode), but the last time I checked, both were around an order of magnitude faster (excepting the possibility that my Rust code was really inefficient in some other way, but I was pretty careful) |
I've tried to compare spade with libspatialindex, so far spade seemed to outperform libspatialindex. However, maybe I'm not using libspatialindex correctly, or its parameters are not set up ideally. Maybe my test dataset (randomly generated, sometimes intersecting lines) was not chosen carefully enough, so this comparison should be taken with a grain of salt. |
I've implemented the OMT-thingy, you'll find it on the master branch. |
Amazing, I'll try it out over the weekend. Thank you! |
I need to break down the exact speedup, but using |
I have compared the performance of spade with rbush (running locally on the same machine). Spade ran sequential insertions about 1.4 times faster than rbush, bulk loading ran about 2.7 times faster. Just make sure that you have rust's optimizations enabled, they make a huge difference: The optimizations speed up the sequential insertion about 150 times, bulk load is improved about 190 times. |
I'm wondering whether you've benchmarked insertion performance when populating the R* Tree; We're currently using Spade in a couple of places in rust-geo (it's working perfectly, thank you!), and our primary applications involve one-time bulk-inserting line segments into the tree. It's hard to know without comparing to other libraries, but performance seems slower than expected; I see times around 90 ms for inserting segments built from ~9k points. If you have any ideas for improving this, or ideas for improving insertion performance in the library, I'd be interested in helping out with development.
The text was updated successfully, but these errors were encountered: