Hi Felix,

On Sat, Jan 16, 2010 at 09:02:05PM +0100, Felix Hartmann wrote:
> 
> 
> On 16.01.2010 20:59, Marko Mäkelä wrote:
> > +natural ~ 'wetland\|marsh\|mud' [0x51 resolution 20]
> >    
> Is there a performance increase (or maybe memory usage decrease) vs:
> natural=wetland | natural=marsh | natural=mud [0x51 resolution 20]
> 
> ????

You're right, I should have timed it.  Sorry, I do not know how to
measure memory usage, but I would not expect any significant difference
there.

I tried the attached optimizations to the default style.  Without the
optimizations, it took this long to compile my three tiles of Finland:

real    3m53.333s
user    4m23.332s
sys     0m7.752s

With the style optimized with top-level regexp matches, the compilation
is very slightly faster:

real    3m50.705s
user    4m21.924s
sys     0m7.744s

Note that I had the Ondemand CPU frequency scaling governor enabled.

For some reason, the generated maps are of different size:

-rw-r--r-- 1 marko marko 45475840 16.1. 22:17 gmapsupp.img
-rw-r--r-- 1 marko marko 45423616 16.1. 22:12 gmapsupp-relop.img

I did not investigate this difference yet?

Can you give it a spin on your system?

Best regards,

        Marko
Index: resources/styles/default/lines
===================================================================
--- resources/styles/default/lines	(revision 1479)
+++ resources/styles/default/lines	(working copy)
@@ -33,17 +33,14 @@ highway=* {name '${ref} ${name}' | '${re
 
 # Flag unpaved roads.
 highway=*
-& (surface=cobblestone | surface=compacted | surface=dirt |
-   surface=earth | surface=grass | surface=grass_paver |
-   surface=gravel | surface=grit | surface=ground | surface=mud |
-   surface=pebblestone | surface=sand | surface=unpaved |
+& (surface ~ 'cobblestone\|compacted\|dirt\|earth\|grass\(_paver\)?\|gravel\|grit\|ground\|mud\|pebblestone\|sand\|unpaved' |
    mtb:scale=* |
    tracktype ~ 'grade[2-6]' |
    smoothness ~ '.*\(bad\|horrible\|impassable\)' |
    sac_scale ~ '.*\(mountain\|alpine\)_hiking' |
    sport=via_ferrata)
 { add mkgmap:unpaved=1 }
-(highway=bridleway | highway=path | highway=track | highway=unsurfaced)
+highway ~ 'bridleway\|path\|track\|unsurfaced'
 & surface!=* & tracktype!=* & smoothness!=* & sac_scale!=*
 { add mkgmap:unpaved=1 }
 
Index: resources/styles/default/polygons
===================================================================
--- resources/styles/default/polygons	(revision 1481)
+++ resources/styles/default/polygons	(working copy)
@@ -61,9 +61,7 @@ military=danger_area [0x04 resolution 18
 military=range [0x04 resolution 18]
 
 natural=glacier [0x4d resolution 16]
-natural=marsh [0x51 resolution 20]
-natural=mud [0x51 resolution 20]
-natural=wetland [0x51 resolution 20]
+natural ~ 'wetland\|marsh\|mud' [0x51 resolution 20]
 natural=scrub [0x4f resolution 20]
 natural=water [0x3c resolution 20]
 natural=sea [0x32 resolution 10]
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to