davidmoten / davidmoten/rtree

[Question] How can I improve performance ?

Open
#37 3 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Java
Stars
1.1k
Forks
218
Avg merge
2m
Merged PRs (30d)
1

Description

Hi David,

So I've been playing with the benchmarks changing some stuff to comply with my use case and see how this goes:
- As you did with the greek points, i created entries composed of circles (geocircles, most of which have a radius of 0.1 km) . My data set contains 85k geopoints + radius.
- In the search benchmarks, instead of searching a rectangle, i'm searching a point ("is that point in any of the circles ?").

Well, the bench ran for about an hour and the results were really bad: I barely reach 100 ops / sec whatever the maxChildren I used.

When I take a look at the visualization, it seems a bit weird:
starm4:
![starm4](https://cloud.githubusercontent.com/assets/259699/12297241/8c367240-ba0c-11e5-89e9-bd42802c431d.png)

defaultm4:
![defaultm4](https://cloud.githubusercontent.com/assets/259699/12297271/ac928a1a-ba0c-11e5-8a1d-f687afd509ca.png)

Maybe It will mean something to you but it looks nothing like what you're showing on your main page.

So I tried replacing my circles by rectangles (i did that really quick just using the circle's center from my data and creating a square by adding +0.5 to the lat and lon). Now i'm starting to get decent results: 5k / ops. I also tried increasing the rectangle size (+1.0 instead of +0.5) and got down to 4k ops / sec.

The visualisation seems a bit more coherent there:
starM4:
![rect-starm4](https://cloud.githubusercontent.com/assets/259699/12297628/57659580-ba0e-11e5-910b-3790e00b03b1.png)

defaultM4:
![rect-defaultm4](https://cloud.githubusercontent.com/assets/259699/12297632/5b914ac8-ba0e-11e5-8ce8-694f490d8c3c.png)

So here are the things I'd like to ask:
- Are circles that bad ?
- When using `Geometries.circle(x, y, radius)` can you confirm that `x` is the `lon` and `y` is the `lat` (provided they've been normalized beforehand) ? Also what is the unit of the radius ? I assumed it was `km` but now that i'm looking at it, it seems it's not and it would be more of a x-y variation value.

It feels like I'm doing something wrong.

Just to be clear. my ultimate goal is to find the best compromise between precision and speed to search all 85k (but i'm targeting 1m) geocircles that matches a specific geopoint.

Thanks for your insight on the matter.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.