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

add benchmark mode #19

Closed
wants to merge 1 commit into from
Closed

Conversation

nebulon42
Copy link
Contributor

I was curious how much faster magnacarto is compared to carto so I wrote a benchmarking mode similar to the one carto comes with.

I compared openstreetmap-carto. The results were expected, but are impressive:

magnacarto

MML parse time: 3.463087ms

Layer style.mss parse time: 319.538µs
Layer shapefiles.mss parse time: 373.534µs
Layer landcover.mss parse time: 12.623951ms
Layer water.mss parse time: 4.838667ms
Layer water-features.mss parse time: 1.896581ms
Layer roads.mss parse time: 54.149293ms
Layer power.mss parse time: 348.63µs
Layer citywalls.mss parse time: 126.75µs
Layer placenames.mss parse time: 2.697119ms
Layer buildings.mss parse time: 398.599µs
Layer stations.mss parse time: 1.33046ms
Layer amenity-points.mss parse time: 38.750649ms
Layer ferry-routes.mss parse time: 333.097µs
Layer aerialways.mss parse time: 543.34µs
Layer admin.mss parse time: 2.125118ms
Layer addressing.mss parse time: 411.803µs

Evaluation time: 2.671625ms

Layer world rules build time: 45.821µs
Layer coast-poly rules build time: 34.782µs
Layer builtup rules build time: 26.781µs
Layer necountries rules build time: 46.088µs
Layer landcover-low-zoom rules build time: 425.072µs
Layer landcover rules build time: 20.641744ms
Layer landcover-line rules build time: 63.304µs
Layer water-lines-casing rules build time: 148.176µs
Layer water-lines-low-zoom rules build time: 108.278µs
Layer icesheet-poly rules build time: 35.196µs
Layer water-areas rules build time: 263.806µs
Layer landcover-area-symbols rules build time: 167.066µs
Layer icesheet-outlines rules build time: 96.835µs
Layer water-lines rules build time: 68.505532ms
Layer water-barriers-line rules build time: 67.898µs
Layer water-barriers-poly rules build time: 28.403µs
Layer marinas-area rules build time: 84.909µs
Layer piers-poly rules build time: 52.953µs
Layer piers-line rules build time: 124.331µs
Layer water-barriers-point rules build time: 118.015µs
Layer bridge rules build time: 28.476µs
Layer buildings rules build time: 44.184µs
Layer buildings-major rules build time: 116.329µs
Layer tunnels rules build time: 185.786967ms
Layer citywalls rules build time: 66.551µs
Layer landuse-overlay rules build time: 85.712µs
Layer line-barriers rules build time: 77.148µs
Layer cliffs rules build time: 45.461µs
Layer area-barriers rules build time: 110.406µs
Layer ferry-routes rules build time: 55.116µs
Layer turning-circle-casing rules build time: 478.318µs
Layer highway-area-casing rules build time: 150.735µs
Layer roads-casing rules build time: 2.748187ms
Layer highway-area-fill rules build time: 173.092µs
Layer roads-fill rules build time: 291.542416ms
Layer turning-circle-fill rules build time: 466.959µs
Layer aerialways rules build time: 239.024µs
Layer roads-low-zoom rules build time: 264.937µs
Layer waterway-bridges rules build time: 68.873741ms
Layer bridges rules build time: 212.223266ms
Layer guideways rules build time: 64.416µs
Layer admin-low-zoom rules build time: 174.861µs
Layer admin-mid-zoom rules build time: 214.603µs
Layer admin-high-zoom rules build time: 257.394µs
Layer power-minorline rules build time: 29.923µs
Layer power-line rules build time: 64.586µs
Layer nature-reserve-boundaries rules build time: 131.536µs
Layer tourism-boundary rules build time: 160.395µs
Layer trees rules build time: 247.511µs
Layer placenames-large rules build time: 184.16µs
Layer placenames-medium rules build time: 483.186µs
Layer placenames-small rules build time: 387.973µs
Layer stations rules build time: 433.668µs
Layer stations-poly rules build time: 391.444µs
Layer amenity-points-poly rules build time: 4.358757ms
Layer amenity-points rules build time: 4.519564ms
Layer power-towers rules build time: 108.012µs
Layer power-poles rules build time: 42.054µs
Layer roads-text-ref-low-zoom rules build time: 299.917µs
Layer junctions rules build time: 929.091µs
Layer bridge-text rules build time: 107.699µs
Layer roads-text-ref rules build time: 853.976µs
Layer roads-area-text-name rules build time: 122.17µs
Layer roads-text-name rules build time: 8.065001ms
Layer paths-text-name rules build time: 378.897µs
Layer text-poly-low-zoom rules build time: 998.941µs
Layer text-poly rules build time: 108.486744ms
Layer text-line rules build time: 241.023µs
Layer text-point rules build time: 102.775643ms
Layer building-text rules build time: 105.181µs
Layer interpolation rules build time: 39.656µs
Layer housenumbers rules build time: 31.172µs
Layer housenames rules build time: 60.15µs
Layer water-lines-text rules build time: 313.261µs
Layer ferry-routes-text rules build time: 83.208µs
Layer admin-text rules build time: 35.676µs
Layer nature-reserve-text rules build time: 25.526µs
Layer amenity-low-priority rules build time: 14.267874ms
Layer amenity-low-priority-poly rules build time: 6.545633ms

TOTAL: 1.240451127s

carto

Parsing time: 13ms
Parsing time: 3ms
Parsing time: 23ms
Parsing time: 7ms
Parsing time: 5ms
Parsing time: 38ms
Parsing time: 1ms
Parsing time: 1ms
Parsing time: 5ms
Parsing time: 2ms
Parsing time: 2ms
Parsing time: 34ms
Parsing time: 1ms
Parsing time: 2ms
Parsing time: 5ms
Parsing time: 0ms
processing layer: world
Inheritance time: 1ms
processing layer: coast-poly
Inheritance time: 0ms
processing layer: builtup
Inheritance time: 0ms
processing layer: necountries
Inheritance time: 0ms
processing layer: landcover-low-zoom
Inheritance time: 125ms
processing layer: landcover
Inheritance time: 106ms
processing layer: landcover-line
Inheritance time: 0ms
processing layer: water-lines-casing
Inheritance time: 0ms
processing layer: water-lines-low-zoom
Inheritance time: 0ms
processing layer: icesheet-poly
Inheritance time: 0ms
processing layer: water-areas
Inheritance time: 0ms
processing layer: landcover-area-symbols
Inheritance time: 0ms
processing layer: icesheet-outlines
Inheritance time: 0ms
processing layer: water-lines
Inheritance time: 21ms
processing layer: water-barriers-line
Inheritance time: 0ms
processing layer: water-barriers-poly
Inheritance time: 1ms
processing layer: marinas-area
Inheritance time: 0ms
processing layer: piers-poly
Inheritance time: 0ms
processing layer: piers-line
Inheritance time: 0ms
processing layer: water-barriers-point
Inheritance time: 0ms
processing layer: bridge
Inheritance time: 0ms
processing layer: buildings
Inheritance time: 0ms
processing layer: buildings-major
Inheritance time: 1ms
processing layer: tunnels
Inheritance time: 378ms
processing layer: citywalls
Inheritance time: 0ms
processing layer: landuse-overlay
Inheritance time: 0ms
processing layer: line-barriers
Inheritance time: 0ms
processing layer: cliffs
Inheritance time: 0ms
processing layer: area-barriers
Inheritance time: 0ms
processing layer: ferry-routes
Inheritance time: 0ms
processing layer: turning-circle-casing
Inheritance time: 3ms
processing layer: highway-area-casing
Inheritance time: 1ms
processing layer: roads-casing
Inheritance time: 35ms
processing layer: highway-area-fill
Inheritance time: 2ms
processing layer: roads-fill
Inheritance time: 394ms
processing layer: turning-circle-fill
Inheritance time: 2ms
processing layer: aerialways
Inheritance time: 0ms
processing layer: roads-low-zoom
Inheritance time: 160ms
processing layer: waterway-bridges
Inheritance time: 20ms
processing layer: bridges
Inheritance time: 482ms
processing layer: guideways
Inheritance time: 0ms
processing layer: admin-low-zoom
Inheritance time: 0ms
processing layer: admin-mid-zoom
Inheritance time: 1ms
processing layer: admin-high-zoom
Inheritance time: 1ms
processing layer: power-minorline
Inheritance time: 0ms
processing layer: power-line
Inheritance time: 0ms
processing layer: nature-reserve-boundaries
Inheritance time: 1ms
processing layer: tourism-boundary
Inheritance time: 1ms
processing layer: trees
Inheritance time: 1ms
processing layer: placenames-large
Inheritance time: 2ms
processing layer: placenames-medium
Inheritance time: 3ms
processing layer: placenames-small
Inheritance time: 1ms
processing layer: stations
Inheritance time: 1ms
processing layer: stations-poly
Inheritance time: 1ms
processing layer: amenity-points-poly
Inheritance time: 34ms
processing layer: amenity-points
Inheritance time: 34ms
processing layer: power-towers
Inheritance time: 0ms
processing layer: power-poles
Inheritance time: 1ms
processing layer: roads-text-ref-low-zoom
Inheritance time: 0ms
processing layer: junctions
Inheritance time: 2ms
processing layer: bridge-text
Inheritance time: 1ms
processing layer: roads-text-ref
Inheritance time: 3ms
processing layer: roads-area-text-name
Inheritance time: 1ms
processing layer: roads-text-name
Inheritance time: 8ms
processing layer: paths-text-name
Inheritance time: 1ms
processing layer: text-poly-low-zoom
Inheritance time: 759ms
processing layer: text-poly
Inheritance time: 1061ms
processing layer: text-line
Inheritance time: 1ms
processing layer: text-point
Inheritance time: 1050ms
processing layer: building-text
Inheritance time: 0ms
processing layer: interpolation
Inheritance time: 0ms
processing layer: housenumbers
Inheritance time: 0ms
processing layer: housenames
Inheritance time: 1ms
processing layer: water-lines-text
Inheritance time: 2ms
processing layer: ferry-routes-text
Inheritance time: 1ms
processing layer: admin-text
Inheritance time: 0ms
processing layer: nature-reserve-text
Inheritance time: 0ms
processing layer: amenity-low-priority
Inheritance time: 4ms
processing layer: amenity-low-priority-poly
Inheritance time: 4ms
TOTAL: 10080ms

@nebulon42
Copy link
Contributor Author

Seems there is no interest in this. Closing.

@nebulon42 nebulon42 closed this Apr 12, 2016
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.

1 participant