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

Rework the tunnel and bridge layers for better performance #66

Merged
merged 1 commit into from
Feb 20, 2019

Conversation

Phyks
Copy link
Member

@Phyks Phyks commented Feb 20, 2019

@Florimondable This is changing quite a lot of lines of code for the render of tunnels and bridges. I did some checks in places I know, but I could definitely use a second pair of eyes on this. Could you check that the render is the same as the current one for bridges and tunnels you are familiar with? Thanks!

Compiling the project to a Mapnik XML file was taking a lot of time,
mainly due to the tunnel and bridge layers. Here are some fixes to
improve compilation time.

  • Use attachments for tunnels and bridges instead of selecting all the
    data three times from the database and filtering on it.
  • Rework the filtering in roads.mss file to avoid having too many
    levels of imbrication, responsible for a lot of overhead at compilation.
  • Remove the upper zoom limit as there is no reason to stop displaying
    the roads above zoom 20.

Before this PR, compilation time obtained through

\time carto cyclosm-cartocss-style/project.mml > /dev/null

was of about 5 minutes.

It is now of 24 seconds.

Fixes #60.

Compiling the project to a Mapnik XML file was taking a lot of time,
mainly due to the tunnel and bridge layers. Here are some fixes to
improve compilation time.

* Use attachments for tunnels and bridges instead of selecting all the
data three times from the database and filtering on it.
* Rework the filtering in `roads.mss` file to avoid having too many
levels of imbrication, responsible for a lot of overhead at compilation.
* Remove the upper zoom limit as there is no reason to stop displaying
the roads above zoom 20.

Before this PR, compilation time obtained through

```
\time carto cyclosm-cartocss-style/project.mml > /dev/null
```

was of about 5 minutes.

It is now of 24 seconds.

Fixes cyclosm#60.
@Florimondable
Copy link
Member

Je valide

@Phyks Phyks merged commit 6b46e47 into cyclosm:master Feb 20, 2019
@Phyks
Copy link
Member Author

Phyks commented Feb 20, 2019

Thanks!

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.

Generation of Mapnik XML file is long
2 participants