logo separator

[mkgmap-dev] Bug in LocationHook?

From GerdP gpetermann_muenchen at hotmail.com on Sat Jan 7 14:21:18 GMT 2012

Hi,


WanMil wrote
> 
> that sounds strange. I think recreating the quadtree would only be 
> benficial if recreating takes less time than removing elements. I wonder 
> if that's the case?
> 

I think the current quadtree implementation has one problem: As long as it
still contains a few elements, a get(...) takes more or less the same time.
I guess that's because it still calls a lot of intersect() calculations to
return a result. 
I am still searching for an error which seems to slow down the program too
much, but my patch does this:
- It keeps the list elemList
- If currLevel is changed, it checks if the previous level caused any
changes to the elements in the quadTree. If not, the whole elemList is
tested, all elements that are fully worked out are removed.
If the remaining list is much smaller, the quadtree is replaced.

Ciao,
Gerd


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



More information about the mkgmap-dev mailing list