Boost logo

Geometry :

Subject: [ggl] spacial index (was spacial index construction interface)
From: Bruno Lalande (bruno.lalande)
Date: 2011-03-13 17:13:49


Hi

However, Bruno's remark about copying the whole underlying subtree
>> triggered me - depending on the number of levels this might become
>> substantial... If the nodes are small (bbox + index), it might be worth
>> it. Just depends on the size of the nodes vs. the gain we get from
>> avoiding dynamic memory for each node.
>>
>> We might examine this behaviour first in a minimal test.
>>
>
> If I'm right, only values have to be copied. I'll have some basic version
> soon.
>
>
I was not talking about intended copies, these should indeed not happen. But
a vector can make a copy of itself any time it needs to expand its buffer,
so copies happen virtually all the time inside a vector. Of course you can
always tell your vector to reserve the maximum allowed number of nodes when
you create it, if this maximum number is reasonable (have no idea what it
usually is)...

I wouldn't say the impact only depends on the size of nodes. It also (and
maybe much more) depends on the depth of your tree, which will make the
performance hit increase exponentially.

Regards
Bruno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/ggl/attachments/20110313/94060f9d/attachment.html


Geometry list run by mateusz at loskot.net