logo separator

[mkgmap-dev] patch to improve style throughput

From Gerd Petermann GPetermann_muenchen at hotmail.com on Tue Apr 24 15:08:55 BST 2018

Hi Steve,

I think I found a simple patch to improve the rule index. I've noticed that the unpatched version often returns far more rules to check than expected.
e.g. if an element has the tag a=3 and we have these 3 rules
a=1 {...}
a=2 & b=1 {...}
a=3 & c=1 {...}

all three are evaluated, in fact all rules which have a keystring beginning with a= are returned by the index. The patch changes this so that rules which cannot match are not
returned. This makes style evaluation a bit faster.  I've tried it with a few styles and some input files and found no changes in the output, also all unit tests pass, so I hope I did not miss something.  What do you think?

Gerd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: improve-rule-index.patch
Type: application/octet-stream
Size: 1568 bytes
Desc: improve-rule-index.patch
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20180424/39261569/attachment.obj>


More information about the mkgmap-dev mailing list