[mkgmap-dev] patch to improve style throughput
From Gerd Petermann gpetermann_muenchen at hotmail.com on Wed Apr 25 06:30:05 BST 2018
Hi Steve, thanks for review, I've added a unit test to show why your version doesn't work. I see no simple way to improve the index much more. I thought about a different approach: Instead of doing all the calculations before any rule is really executed we might do this dynamically. Each rule which changes or adds tags would point to a list of further rules which are to be checked. Only when such a change really happens the additional rules are checked. No idea if this can be implemented more efficiently than the current static index. Gerd ________________________________________ Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Steve Ratcliffe <steve at parabola.me.uk> Gesendet: Dienstag, 24. April 2018 23:06:11 An: mkgmap-dev at lists.mkgmap.org.uk Betreff: Re: [mkgmap-dev] patch to improve style throughput Hi Gerd I don't think I understand any of this any more :( It didn't seem right to extract the key from the keystring so I tried without and the attached patch also passes all the tests - I make no other claim! Steve > 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 > > > > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev >
- Previous message: [mkgmap-dev] patch to improve style throughput
- Next message: [mkgmap-dev] patch to improve style throughput
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list