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

Revert "Render unpaved roads different" #3386

Merged
merged 1 commit into from
Sep 13, 2018
Merged

Conversation

sommerluk
Copy link
Collaborator

Reverts #3357

@sommerluk sommerluk merged commit aa4754f into master Sep 13, 2018
@imagico
Copy link
Collaborator

imagico commented Sep 13, 2018

Could you explain the reasoning behind this and your plan to proceed with this change?

@sommerluk
Copy link
Collaborator Author

Well, in the detailed testing that @rrzefox did with this change, it has a performance impact on higher zoom level.

I have played around a little bit with a different SQL query reducing the amount of actually rendered globalboundingboxes and the SQL query gets more complicated. And I run into an SQL syntax problem that I do not understand (has apparently something to do with bbox)

As @tomhughes for the moment did not made a statement in #3386 about how much impact that would have on openstreetmap.org servers, and as the next release is planed for 21 september 2018 and as I do not have much time currently to proceed with investigating the SQL query, I preferred to stay on the same side and avoid performance problems like the last time. And avoid to feel in hurry.

I’ve detected also a minor bug in this pull request. (Unpaved railway=platform that are at the same time bridges do not render in the correct colour if layer=* is different from 0).

Plans to proceed? My idea would be:

  • Fix the railway=platform bug
  • Adding cache feature also for turning circles and aero-ways. Maybe this is enough to get better performance.
  • Asking help from @rrzefox for testing this (as my local setup has proven not to be representative for performance testing)
  • If the performance result are acceptable for OSMF servers, merge it. If not, than taking a closer look to the SQL query.

But I’m open for other suggestions…

@sommerluk
Copy link
Collaborator Author

The easy fix for the railway=platform bug is rendering unpaved platforms (both railway=platform and highway=platform) like paved ones.

@imagico
Copy link
Collaborator

imagico commented Sep 13, 2018

My recommendation in #3357 (comment) was to see if you can reproduce the performance difference in a test environment and if yes to try pinpointing what exactly makes the difference.

@sommerluk
Copy link
Collaborator Author

My recommendation in #3357 (comment) was to see if you can reproduce the performance difference in a test environment

I’ve tried to reproduce this locally and was not able to. Measuring the time for tile rendering using the script from @giggls gives me the same performance with or without this PR.

As @talaj said:

The dst-over is not executed if the polygon is not rendered. It would most likely help to render it only if there are corresponding roads rendered.

This was the starting point for looking at SQL query tuning…

@imagico
Copy link
Collaborator

imagico commented Sep 13, 2018

I’ve tried to reproduce this locally and was not able to.

If you can't reproduce it in a test environment i would avoid drawing any broader conclusions or making decisions based on a single observation without information what part of the process is slower exactly.

If you can't reproduce it in a test environment you can essentially also rule out any universal performance issues in mapnik with the code used (including ones due to unnecessary geometries being included in rendering) because what mapnik receives to render will be the same no matter if you are on a global database or just with a small test data set.

@kocio-pl kocio-pl deleted the revert-3357-unpaved20 branch September 15, 2018 20:53
@sommerluk
Copy link
Collaborator Author

Okay. At https://github.com/sommerluk/openstreetmap-carto/tree/unpaved24 is what I’m currently working on.

The problem with platform rendering was that the globalboundingbox for bridges is the result of a SELECT DISTINCT only in the highway part, but for platform we have both highway=platform and railway=platform. An SQL that catches this case has to span over both, highway and railway part. As this could be complicate, for the moment I do no special unpaved rendering for platforms.

For performance, as the bridges layer with will potentially be rendered various times (at difference to road-fill or roads-low-zoom), and as this layer has yet a SELECT DISTINCT, I’ve done now a better filtering. For performance measuring I’ve tried to eliminate factors like other programs that in in parallel. With the new code, I get more or less the same performance (base on single-tile-measurement) that without unpaved rendering (while the previous approach was 10% slower).

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

Successfully merging this pull request may close these issues.

3 participants