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

rtree2 #95

Open
davidmoten opened this issue Jul 11, 2019 · 2 comments
Open

rtree2 #95

davidmoten opened this issue Jul 11, 2019 · 2 comments

Comments

@davidmoten
Copy link
Owner

davidmoten commented Jul 11, 2019

I've made a new version of rtree at https://github.com/davidmoten/rtree2. It has a different artifactId rtree2 and different package names so can co-exist with rtree if required.

Instead of supporting RxJava 2 API I've dropped the reactive API completely and now search methods return Iterables. You can then wrap the return with whatever reactive library you like. For instance for RxJava2:

Flowable.fromIterable(tree.search(rect))

One really interesting consequence of dropping the reactive approach in the API is that performance went down about 20% on search benchmarks. It seems that high request fast paths were performing really well and converting to Iterable which is like a request 1, request 1, etc Observable/Flowable is not as fast. Anyway I think the flexibility benefit and reduced dependencies is worth the performance hit. I'll keep looking for opportunities to bring perf up again.

Note also that I've dropped serialization because it's a big maintenance pain. You can do your own serialization and deserialize using bulk packing kindly contributed by @ambling in #67.

I've released rtree2 0.9-RC1 to Maven Central which you can try out.

@plokhotnyuk
Copy link

@davidmoten would it be interested for you to see rtree2 compared with previous implementation and others libraries?

This has a separated submodule with benchmarks and their result charts in the docs directory.

@davidmoten
Copy link
Owner Author

@plokhotnyuk good work on your part. I'll do a bit more perf work and then do a comparison by all means.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants