From 885f818d1f7bcf8769c27427dd4f70498f52d189 Mon Sep 17 00:00:00 2001 From: math1985 Date: Sun, 1 Nov 2015 21:15:48 +0100 Subject: [PATCH] Change order of definitions to speed up carto processing This improves #1941. Carto processing is now overall about 20% faster on my system. --- amenity-points.mss | 154 +++++++++++++++++++++++++++++---------------- 1 file changed, 99 insertions(+), 55 deletions(-) diff --git a/amenity-points.mss b/amenity-points.mss index 84f8ee3b22..6fe81dd60c 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -1318,15 +1318,19 @@ [zoom >= 17] { text-name: "[name]"; text-size: @landcover-font-size; - [way_pixels > 12000] { text-size: @landcover-font-size-big; } - [way_pixels > 48000] { text-size: @landcover-font-size-bigger; } + text-wrap-width: @landcover-wrap-width-size; + [way_pixels > 12000] { + text-size: @landcover-font-size-big; + text-wrap-width: @landcover-wrap-width-size-big; + } + [way_pixels > 48000] { + text-size: @landcover-font-size-bigger; + text-wrap-width: @landcover-wrap-width-size-bigger; + } text-fill: @marina-text; text-face-name: @landcover-face-name; text-halo-radius: 1; text-halo-fill: rgba(255,255,255,0.6); - text-wrap-width: @landcover-wrap-width-size; - [way_pixels > 12000] {text-wrap-width: @landcover-wrap-width-size-big; } - [way_pixels > 48000] {text-wrap-width: @landcover-wrap-width-size-bigger; } text-placement: interior; } } @@ -1360,14 +1364,18 @@ [zoom >= 17] { text-name: "[name]"; text-size: @landcover-font-size; - [way_pixels > 12000] { text-size: @landcover-font-size-big; } - [way_pixels > 48000] { text-size: @landcover-font-size-bigger; } + text-wrap-width: @landcover-wrap-width-size; + [way_pixels > 12000] { + text-size: @landcover-font-size-big; + text-wrap-width: @landcover-wrap-width-size-big; + } + [way_pixels > 48000] { + text-size: @landcover-font-size-bigger; + text-wrap-width: @landcover-wrap-width-size-bigger; + } text-face-name: @landcover-face-name; text-halo-radius: 1; text-halo-fill: rgba(255,255,255,0.6); - text-wrap-width: @landcover-wrap-width-size; - [way_pixels > 12000] {text-wrap-width: @landcover-wrap-width-size-big; } - [way_pixels > 48000] {text-wrap-width: @landcover-wrap-width-size-bigger; } text-placement: interior; [feature = 'landuse_military'] { text-fill: darken(@military, 40%); @@ -1388,15 +1396,19 @@ [zoom >= 17] { text-name: "[name]"; text-size: @landcover-font-size; - [way_pixels > 12000] { text-size: @landcover-font-size-big; } - [way_pixels > 48000] { text-size: @landcover-font-size-bigger; } + text-wrap-width: @landcover-wrap-width-size; + [way_pixels > 12000] { + text-size: @landcover-font-size-big; + text-wrap-width: @landcover-wrap-width-size-big; + } + [way_pixels > 48000] { + text-size: @landcover-font-size-bigger; + text-wrap-width: @landcover-wrap-width-size-bigger; + } text-fill: darken(@danger_area, 40%); text-face-name: @bold-fonts; text-halo-radius: 1; text-halo-fill: rgba(255,255,255,0.6); - text-wrap-width: @landcover-wrap-width-size; - [way_pixels > 12000] {text-wrap-width: @landcover-wrap-width-size-big; } - [way_pixels > 48000] {text-wrap-width: @landcover-wrap-width-size-bigger; } text-placement: interior; } } @@ -1406,15 +1418,19 @@ [zoom >= 17] { text-name: "[name]"; text-size: @landcover-font-size; - [way_pixels > 12000] { text-size: @landcover-font-size-big; } - [way_pixels > 48000] { text-size: @landcover-font-size-bigger; } + text-wrap-width: @landcover-wrap-width-size; + [way_pixels > 12000] { + text-size: @landcover-font-size-big; + text-wrap-width: @landcover-wrap-width-size-big; + } + [way_pixels > 48000] { + text-size: @landcover-font-size-bigger; + text-wrap-width: @landcover-wrap-width-size-bigger; + } text-fill: darken(@garages, 50%); text-face-name: @landcover-face-name; text-halo-radius: 1; text-halo-fill: rgba(255,255,255,0.6); - text-wrap-width: @landcover-wrap-width-size; - [way_pixels > 12000] {text-wrap-width: @landcover-wrap-width-size-big; } - [way_pixels > 48000] {text-wrap-width: @landcover-wrap-width-size-bigger; } text-placement: interior; } } @@ -1471,14 +1487,18 @@ [zoom >= 17][feature = 'shop_mall'] { text-name: "[name]"; text-size: @landcover-font-size; - [way_pixels > 12000] { text-size: @landcover-font-size-big; } - [way_pixels > 48000] { text-size: @landcover-font-size-bigger; } + text-wrap-width: @landcover-wrap-width-size; + [way_pixels > 12000] { + text-size: @landcover-font-size-big; + text-wrap-width: @landcover-wrap-width-size-big; + } + [way_pixels > 48000] { + text-size: @landcover-font-size-bigger; + text-wrap-width: @landcover-wrap-width-size-bigger; + } text-face-name: @landcover-face-name; text-halo-radius: 1; text-halo-fill: rgba(255,255,255,0.6); - text-wrap-width: @landcover-wrap-width-size; - [way_pixels > 12000] {text-wrap-width: @landcover-wrap-width-size-big; } - [way_pixels > 48000] {text-wrap-width: @landcover-wrap-width-size-bigger; } text-placement: interior; [feature = 'natural_wetland'], [feature = 'natural_marsh'], @@ -1686,15 +1706,19 @@ [zoom >= 17] { text-name: "[name]"; text-size: @landcover-font-size; - [way_pixels > 12000] { text-size: @landcover-font-size-big; } - [way_pixels > 48000] { text-size: @landcover-font-size-bigger; } + text-wrap-width: @landcover-wrap-width-size; + [way_pixels > 12000] { + text-size: @landcover-font-size-big; + text-wrap-width: @landcover-wrap-width-size-big; + } + [way_pixels > 48000] { + text-size: @landcover-font-size-bigger; + text-wrap-width: @landcover-wrap-width-size-bigger; + } text-fill: @marina-text; text-face-name: @landcover-face-name; text-halo-radius: 1; text-halo-fill: rgba(255,255,255,0.6); - text-wrap-width: @landcover-wrap-width-size; - [way_pixels > 12000] {text-wrap-width: @landcover-wrap-width-size-big; } - [way_pixels > 48000] {text-wrap-width: @landcover-wrap-width-size-bigger; } text-placement: interior; } } @@ -1891,15 +1915,19 @@ [zoom >= 17] { text-name: "[name]"; text-size: @landcover-font-size; - [way_pixels > 12000] { text-size: @landcover-font-size-big; } - [way_pixels > 48000] { text-size: @landcover-font-size-bigger; } + text-wrap-width: @landcover-wrap-width-size; + [way_pixels > 12000] { + text-size: @landcover-font-size-big; + text-wrap-width: @landcover-wrap-width-size-big; + } + [way_pixels > 48000] { + text-size: @landcover-font-size-bigger; + text-wrap-width: @landcover-wrap-width-size-bigger; + } text-fill: darken(@power, 40%); text-face-name: @landcover-face-name; text-halo-radius: 1; text-halo-fill: rgba(255,255,255,0.6); - text-wrap-width: @landcover-wrap-width-size; - [way_pixels > 12000] {text-wrap-width: @landcover-wrap-width-size-big; } - [way_pixels > 48000] {text-wrap-width: @landcover-wrap-width-size-bigger; } text-placement: interior; } } @@ -1912,14 +1940,18 @@ [zoom >= 17][is_building = 'no'] { text-name: "[name]"; text-size: @landcover-font-size; - [way_pixels > 12000] { text-size: @landcover-font-size-big; } - [way_pixels > 48000] { text-size: @landcover-font-size-bigger; } + text-wrap-width: @landcover-wrap-width-size; + [way_pixels > 12000] { + text-size: @landcover-font-size-big; + text-wrap-width: @landcover-wrap-width-size-big; + } + [way_pixels > 48000] { + text-size: @landcover-font-size-bigger; + text-wrap-width: @landcover-wrap-width-size-bigger; + } text-face-name: @landcover-face-name; text-halo-radius: 1; text-halo-fill: rgba(255,255,255,0.6); - text-wrap-width: @landcover-wrap-width-size; - [way_pixels > 12000] {text-wrap-width: @landcover-wrap-width-size-big; } - [way_pixels > 48000] {text-wrap-width: @landcover-wrap-width-size-bigger; } text-placement: interior; [feature = 'natural_scree'], [feature = 'natural_shingle'], @@ -1937,15 +1969,19 @@ [zoom >= 17] { text-name: "[name]"; text-size: @landcover-font-size; - [way_pixels > 12000] { text-size: @landcover-font-size-big; } - [way_pixels > 48000] { text-size: @landcover-font-size-bigger; } + text-wrap-width: @landcover-wrap-width-size; + [way_pixels > 12000] { + text-size: @landcover-font-size-big; + text-wrap-width: @landcover-wrap-width-size-big; + } + [way_pixels > 48000] { + text-size: @landcover-font-size-bigger; + text-wrap-width: @landcover-wrap-width-size-bigger; + } text-fill: darken(@apron, 60%); text-face-name: @landcover-face-name; text-halo-radius: 1; text-halo-fill: rgba(255,255,255,0.6); - text-wrap-width: @landcover-wrap-width-size; - [way_pixels > 12000] {text-wrap-width: @landcover-wrap-width-size-big; } - [way_pixels > 48000] {text-wrap-width: @landcover-wrap-width-size-bigger; } text-placement: interior; } } @@ -1956,15 +1992,19 @@ [zoom >= 17] { text-name: "[name]"; text-size: @landcover-font-size; - [way_pixels > 12000] { text-size: @landcover-font-size-big; } - [way_pixels > 48000] { text-size: @landcover-font-size-bigger; } + text-wrap-width: @landcover-wrap-width-size; + [way_pixels > 12000] { + text-size: @landcover-font-size-big; + text-wrap-width: @landcover-wrap-width-size-big; + } + [way_pixels > 48000] { + text-size: @landcover-font-size-bigger; + text-wrap-width: @landcover-wrap-width-size-bigger; + } text-fill: darken(@rest_area, 40%); text-face-name: @landcover-face-name; text-halo-radius: 1; text-halo-fill: rgba(255,255,255,0.6); - text-wrap-width: @landcover-wrap-width-size; - [way_pixels > 12000] {text-wrap-width: @landcover-wrap-width-size-big; } - [way_pixels > 48000] {text-wrap-width: @landcover-wrap-width-size-bigger; } text-placement: interior; } } @@ -1975,15 +2015,19 @@ [zoom >= 17] { text-name: "[name]"; text-size: @landcover-font-size; - [way_pixels > 12000] { text-size: @landcover-font-size-big; } - [way_pixels > 48000] { text-size: @landcover-font-size-bigger; } + text-wrap-width: @landcover-wrap-width-size; + [way_pixels > 12000] { + text-size: @landcover-font-size-big; + text-wrap-width: @landcover-wrap-width-size-big; + } + [way_pixels > 48000] { + text-size: @landcover-font-size-bigger; + text-wrap-width: @landcover-wrap-width-size-bigger; + } text-fill: mix(darken(@glacier, 40%), darken(@glacier-line, 30%), 50%); text-face-name: @landcover-face-name; text-halo-radius: 1; text-halo-fill: rgba(255,255,255,0.6); - text-wrap-width: @landcover-wrap-width-size; - [way_pixels > 12000] {text-wrap-width: @landcover-wrap-width-size-big; } - [way_pixels > 48000] {text-wrap-width: @landcover-wrap-width-size-bigger; } text-placement: interior; } }