branch for faster tag evaluation

git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/performance2@3235 25d90789-57f7-4ee0-8453-03a3dfeeeb22
step 1: use a dictionary for the tag keys, store only the index
into the dictionary.

This allows a faster keyPos() method and RuleIndex can use
the index to store the matching rules.
Is a bit faster and requires less memory compared to trunk.


git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/performance2@3236 25d90789-57f7-4ee0-8453-03a3dfeeeb22
step 2: add simple caching of previously evaluated terms
(each action that changes a tag resets the cache)

- Translate often used tags to a short id only once 
to reduce number of TagDict.xlate() calls 


git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/performance2@3237 25d90789-57f7-4ee0-8453-03a3dfeeeb22
remove debug code that makes caching slower

fix possible invalid cast

git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/performance2@3238 25d90789-57f7-4ee0-8453-03a3dfeeeb22
use compiled tags in a few more places

git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/performance2@3239 25d90789-57f7-4ee0-8453-03a3dfeeeb22
fix error regarding cache: use same cache id for all line rules,
as they share common expressions when combined rules for lines and polygons are
used. 

Use cache also for OrOp

git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/performance2@3240 25d90789-57f7-4ee0-8453-03a3dfeeeb22
apply reverse-oneway-v3.patch 

This patch makes sure that multiple copies of an OSM way 
with different oneway=* tags are not treated the same.

Without this patch the result is more or less unpredictable
if you use something like this:
xyz=* { add oneway=-1 } [0x1010 resolution 23 continue]
xyz=* { set oneway=yes } [0x1011 resolution 23 continue]
xyz=* { set oneway=-1 } [0x10 road_speed=1 resolution 23]

todo: check code for restriction relations

git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/performance2@3242 25d90789-57f7-4ee0-8453-03a3dfeeeb22
fix unit test

git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/performance2@3243 25d90789-57f7-4ee0-8453-03a3dfeeeb22
improve splitting of road network data



git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/performance2@3244 25d90789-57f7-4ee0-8453-03a3dfeeeb22
improve splitting of road network data: free memory before starting recursion



git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/performance2@3245 25d90789-57f7-4ee0-8453-03a3dfeeeb22
merge from trunk r3246

git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/performance2@3247 25d90789-57f7-4ee0-8453-03a3dfeeeb22
merge from trunk r3248

git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/performance2@3249 25d90789-57f7-4ee0-8453-03a3dfeeeb22
improve speed: use Pattern.compile() once for subst and highway-symbol style functions



git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/performance2@3250 25d90789-57f7-4ee0-8453-03a3dfeeeb22
 mark static methods in HousenumberGenerator as such

git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/performance2@3251 25d90789-57f7-4ee0-8453-03a3dfeeeb22
code cleanup, no change in runtime or output expected

git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/performance2@3252 25d90789-57f7-4ee0-8453-03a3dfeeeb22
correct compile phase for LinkedOp 

Some or-combined expressions were wrongly replaced by 
a different part of another or-combined expression.


git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/performance2@3253 25d90789-57f7-4ee0-8453-03a3dfeeeb22
check cacheId first for equality, next for greater than

git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/performance2@3254 25d90789-57f7-4ee0-8453-03a3dfeeeb22
improve cache: don't invalidate if action doesn't add or change tags

git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/performance2@3255 25d90789-57f7-4ee0-8453-03a3dfeeeb22
correction: don't compare byte with 0xff

No change in output expected. The code is meant
to save some operations, but that never happened.



git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/performance2@3256 25d90789-57f7-4ee0-8453-03a3dfeeeb22
improve memory consumption

- The id of a CoordNode/RouteNode is an int, not a long.

- Don't save incoming and outgoing arcs in RouteNode. We 
always create the reverse arc, so we can simply add a pointer
to the reverse arc in each RouteArc instance. 
This reduces the number of ArrayList instances.

This change saves around 10 MB heap for a tile with ~110000 RouteNodes.


git-svn-id: http://svn.mkgmap.org.uk/mkgmap/branches/performance2@3257 25d90789-57f7-4ee0-8453-03a3dfeeeb22