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

Performance tuning #30

Open
karussell opened this issue Mar 18, 2019 · 4 comments
Open

Performance tuning #30

karussell opened this issue Mar 18, 2019 · 4 comments

Comments

@karussell
Copy link

karussell commented Mar 18, 2019

Thanks for this library!

I'm currently testing this to create MVT from a graphhopper routing engine storage. If I did nothing wrong your mapbox-vector-tile-java library is already roughly 10 times faster than https://github.com/ElectronicChartCentre/java-vector-tile which is really nice :) !

For bigger tiles fetching the geometry from the graphhopper storage takes around 0.5sec and this produces around 350 000 simple lines (a line going from junction to junction, i.e. with "from" and "to" Coordinate) and converting this into a MVT takes around 4 sec. See the experimental code I use (see update). Usually the lines gets more coordinates and are not just going straight from junction to junction, which I have neglect for now.

Is there a possibility to further improve speed via an index or using a Multiline or something else?

Update: See this work in progress

@ShibaBandit ShibaBandit self-assigned this Apr 2, 2019
@ShibaBandit
Copy link
Member

Thank you. Sorry for the late response here.

I think we have some options for performance improvements - optimization can currently happen before or after JtsAdapter#createTileGeometry(). Curious, what profiling output do you have available for your processing bottlenecks?

@karussell
Copy link
Author

Thanks a lot for your reply - no need to sorry - I know how open source works :)

And this is really great news that there are possibilities as we'll highly likely embed this in GraphHopper to provide a debugging view of the graph in the browser, which is really cool & helpful for us.

See here how we utilized your MVTJ lib

Curious, what profiling output do you have available for your processing bottlenecks?

I just used our StopWatch in the PR mentioned above.

The problem with the current code is that the graphhopper code is mixed with MVTJ and a simple StopWatch won't work, but you can just try the code with and without MVTJ and you'll see that it is a big difference (I can also try again with a profiler but won't be able to do so in the next 2 weeks)

@ShibaBandit
Copy link
Member

Hey, it's been a while so I thought I would check in. Were you ever able to profile/locate the performance bottlenecks that need improvement?

@karussell
Copy link
Author

Unfortunately not yet. Currently we have merged this and plan to improve it later if it is a blocking issue.

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