logo separator

[mkgmap-dev] [PATCHES v1] Perfomance and memory improvements

From WanMil wmgcnfg at web.de on Sat Oct 27 20:37:14 BST 2012

Hi,

attached are 5 patches with slightly performance improvements and 
noticable max memory reductions.

free_mem_earlier_v1:
The coords map is released before the hooks are started. The coords are 
used only while the input data is loaded. Additionally all hooks release 
their data at the end of their end() method.
I measured the maximum memory usage by compiling a big tile and 
minimizing the -Xmx parameter so that no OutOfMemoryError occurred. 
Using the patch I could compile the big tile with 9% less memory.

free_nodes_ways_earlier_v1:
All OSM nodes and ways were removed only after they have been completely 
converted. This patch releases each OSM object just after it has been 
converted to the intermediate MapElement object.

tags_v1:
This patch removes some autoboxing (Integer to int) from heavily used 
methods. I don't know if there still is a penalty for autoboxing with 
current JREs. But it feels better not to use autoboxing.

polyline_addpoints_v1:
Instead of adding point by point to a polyine the patch adds full list 
of points. Arraylists containing the points need to be resized once only 
instead of multiple times.

clipping_v1:
The makeBoundaryNodes method clips all ways to the bounding box. But it 
has to workout all nodes if the way is completely withing the bbox. The 
patch avoids that.



WanMil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: free_nodes_ways_earlier_v1.patch
Type: text/x-patch
Size: 1236 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20121027/6d303fb5/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: polyline_addpoints_v1.patch
Type: text/x-patch
Size: 1188 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20121027/6d303fb5/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tags_v1.patch
Type: text/x-patch
Size: 1545 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20121027/6d303fb5/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clipping_v1.patch
Type: text/x-patch
Size: 4899 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20121027/6d303fb5/attachment-0003.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: free_mem_earlier_v1.patch
Type: text/x-patch
Size: 3436 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20121027/6d303fb5/attachment-0004.bin 


More information about the mkgmap-dev mailing list