logo separator

[mkgmap-dev] [PATCH v1] LocationHook speedup

From GerdP gpetermann_muenchen at hotmail.com on Fri Dec 30 09:50:05 GMT 2011

Hello WanMil,

I also thought about reducing the CPU time in LocationHook, but with a
different approach:
I think a lot of time is used because the quadtree first adds elements to
resultList, (a HashSet) and 2nd a loop takes all these elements to add tags.

Two ideas:
1) Optimization:
It might save time if we could pass a function pointer to the quadtree. The
function does the tagging for one element, and we don't have to manage
resultlists. I implemented that, but the program was slower. I assume that
was caused by the fact that I did not implement the part that removes
elements from the quadtree when they were "fully worked out". 

2) An completely different approach:
I did not yet fully understand the algorithmn in LocationHook, but I got the
impression that it might be possible to create a dictionary with
combinations of admin-level tags, and save a reference to that dictionary
instead of adding similar tags to each element. This could save space and
time, but would require additional logic in class Element. Do you think this
is worth trying?

Ciao,
Gerd

--
View this message in context: http://gis.638310.n2.nabble.com/PATCH-v1-LocationHook-speedup-tp7135704p7137702.html
Sent from the Mkgmap Development mailing list archive at Nabble.com.



More information about the mkgmap-dev mailing list