[Flightgear-devel] [patch] fix FGNewCache to really delete old tiles

2008-02-21 Thread till busch
hi, as discussed with tim on irc. here comes a quick fix for memory-hungry tile manager. due to bugs in FGNewCache old tiles where never deleted. i left the timestamp-updates in the cull-traversal. but imho things work just as well when timestamps are updated in FGNewCache::insert_tile() and

Re: [Flightgear-devel] [patch] fix FGNewCache to really delete old tiles

2008-02-21 Thread Curtis Olson
On Thu, Feb 21, 2008 at 11:11 AM, till busch [EMAIL PROTECTED] wrote: hi, as discussed with tim on irc. here comes a quick fix for memory-hungry tile manager. due to bugs in FGNewCache old tiles where never deleted. i left the timestamp-updates in the cull-traversal. but imho things work

Re: [Flightgear-devel] [patch] fix FGNewCache to really delete old tiles

2008-02-21 Thread till busch
hi curt, 1. this is a really small patch. please read the code before posting funny questions. 2. besides of the missing min_index the logic for finding the oldest tile was plain wrong. notice the comparison operator was wrong? (and in the same manner max_time=0 was wrong) for those who do not

Re: [Flightgear-devel] [patch] fix FGNewCache to really delete old tiles

2008-02-21 Thread Curtis Olson
I was looking through some of the recent code changes for newcache.cxx and I see that the time stamping has seen substantial changes though several revisions and probably does not resemble the plib code any more ... I based my questions on the contents of your patch not realizing the file had seen

Re: [Flightgear-devel] [patch] fix FGNewCache to really delete old tiles

2008-02-21 Thread Curtis Olson
On Thu, Feb 21, 2008 at 1:51 PM, till busch wrote: hi curt, sorry for being rude. your asking (though not specific enough, imho) had a valid point as andy pointed out (in irc). the variable naming was bad. apparently in the transition from plib the wrong branch of the condition got in.

Re: [Flightgear-devel] [patch] fix FGNewCache to really delete old tiles

2008-02-21 Thread till busch
hi curt, sorry for being rude. your asking (though not specific enough, imho) had a valid point as andy pointed out (in irc). the variable naming was bad. apparently in the transition from plib the wrong branch of the condition got in. this patch now fixes the variable names. (and adds

Re: [Flightgear-devel] [patch] fix FGNewCache to really delete old tiles

2008-02-21 Thread till busch
hi curt, i fear i'm not the right person to answer this. (at least not without doing some time-consuming research). i don't *believe* the problem you describe could be related to the deletion of old tiles. what i can tell for sure is that the correct tiles get deleted. i had lots of debugging

Re: [Flightgear-devel] [patch] fix FGNewCache to really delete old tiles

2008-02-21 Thread Curtis Olson
Hi Til, Thanks again for your efforts on this (and to everyone else who participated.) I've just committed the most recent version of this patch. It seemed to stand up well to my stress tests. There is an issue with the ground-cache code not always returning a proper hit, but that seems

Re: [Flightgear-devel] [patch] fix FGNewCache to really delete old tiles

2008-02-21 Thread Tim Moore
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Curtis Olson wrote: | Hi Til, | | Thanks again for your efforts on this (and to everyone else who | participated.) I've just committed the most recent version of this | patch. It seemed to stand up well to my stress tests. There is an | issue with