[Xastir] rtree purge

William McKeehan mckeehan at mckeehan.homeip.net
Tue Mar 1 18:28:26 EST 2005


I guess it's possible that my machine is slow enough and has such a small
amount of RAM that the rtree stuff is getting swapped out and when I refresh
the map, it's not rebuilding the rtree, but swapping?

I can't reproduce it on my Cygwin box (a faster bigger machine)...I'll play
with it a bit more on my lower pwered Linux box and let you know what I find.

On Tue, March 1, 2005 5:52 pm, Tom Russo said:
> On Tue, Mar 01, 2005 at 01:47:37PM -0700, we recorded a bogon-computron
> collision of the <russo at bogodyn.org> flavor, containing:
>> On Tue, Mar 01, 2005 at 02:43:04PM -0500, we recorded a bogon-computron
>> collision of the <mckeehan at mckeehan.homeip.net> flavor, containing:
>> > I have found that the rtree stuff makes map redraw much faster on the
>> machines
>> > that I use while consuming a minimal amount of additional memory.
>> >
>> > I often leave the machine alone for over an hour, then go back to it and
>> begin
>> > to move around. When I wait, it takes forever the first time the maps
>> redraw.
>> >
>> > So I thought I would change the code to leave the rtree indexes stuff
>> around
>> > forever. I found the line:
>> >
>> > purge_shp_hash();
>> >
>> > in main.c and thought that commenting it out would give me the results
>> that I
>> > wanted, but it still appears to purge old indexes.
>> >
>> > Is there an easy way that I can modify the code to make rtree leave it's
>> > indexes around?
>>
>> Um... yeah, you should be able to do that by commenting out
>> "purge_shp_hash();"
>> I'll have to look to see why that's not enough.
>
> The only code in shp_hash.c that clobbers the rtrees is in purge_shp_hash.
> purge_shp_hash should only be called by main.c's UpdateTime function.
>
> If you comment out the purge_shp_hash call, it is not possible for the rtrees
> to be getting purged.  I can't explain the behavior your describing.
>
> --
> Tom Russo    KM5VY     SAR502  DM64ux         http://www.swcp.com/~russo/
> Tijeras, NM  QRPL#1592 K2#398  SOC#236 AHTB#1
>  "When life gives you lemons, find someone with a paper cut."
>
>


-- 
William McKeehan
KI4HDU
Internet: mckeehan at mckeehan.homeip.net
http://mckeehan.homeip.net



More information about the Xastir mailing list