On Fri, Nov 21, 2008 at 11:24 AM, James A. Treacy wrote:

> It is not clear to me that age is the best metric to use in all cases.
> The tile that is the farthest from your current location would also be
> a good candidate for removal.
>
> Since the current algorithm works in most cases, a less intrusive
> solution than messsing with how/when timestamps are applied would be
> to, when the oldest tile has a timestamp of zero, remove the tile that
> is farthest from your current position.


My original implementation did use a distance based metric, but somewhere
along the way another developer did a lot of work on this section of the
code and the cache flush test was switched to a last time in the vicinity of
the viewer metric.

Then in the conversion to OSG, this was changed to the last time the tile
actually passed the cull test to be drawn and tiles that were never drawn
always had a default time stamp of 0.

I'd be ok with moving back towards a distance based metric in the future ...
especially if OSG provides a convenient way to do the computation, but the
current small fix of time stamping tiles correctly when they are first
created regardless of whether or not they are actually drawn on screen
removes the immediate danger and is logically sensible in the context of a
time based cache flush metric.

Curt.
-- 
Curtis Olson: http://baron.flightgear.org/~curt/
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to