logo separator

[mkgmap-dev] [PATCH v2] Performance improvement by removing unused elements before the style processing

From WanMil wmgcnfg at web.de on Tue Jan 3 21:26:08 GMT 2012

The 2nd patch fixes the remaining problems:
1. Ways without tags but referenced by relations are no longer removed 
(they might be tagged by the relation style file and could therefore 
appear in the map)
2. Intersection of ways with the tile bounding box is now checked 
instead of only checking that at least one point is contained in the 
bounding box. Only very few ways are affected by this but otherwise 
routing problems are possible.

The performance improvement seems to be good (measured with my test map):
r2159: ~250s
patched: ~225s

I also expect (although I haven't tested) that the max memory 
requirement of mkgmap is decreased. I think max mem is used when the 
style file is just processed. At this stage all raw OSM elements and all 
style file processed elements are kept in memory. With the patch the 
number of OSM elements is noticeably reduced.


> Hi,
> this is another performance improvement:
> Usually the mkgmap input tiles are larger than the processed bounding
> box (splitter parameter overlap). So there are much many elements which
> are processed but thrown away at a late step in mkgmap.
> The patch tries to remove them much earlier before the style files are
> processed and before the LocationHook starts (which ignores them but
> that must also be calculated).
> The patch contains one drawback:
> Ways which have all its points outside the bounding box of the tile but
> which cross the tile are also removed. If that's a point the patch must
> be improved.
> Have fun!
> WanMil
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove_unused_elements_v2.patch
Type: text/x-patch
Size: 4317 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20120103/2dbb93f8/attachment.bin 

More information about the mkgmap-dev mailing list