Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2002:
[Freeciv-Dev] Re: [RFC] Caching AI values
Home

[Freeciv-Dev] Re: [RFC] Caching AI values

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Cc: rf13@xxxxxxxxxxxxxxxxxxxxxx, "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>, freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [RFC] Caching AI values
From: Mike Kaufman <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 4 Apr 2002 09:36:07 -0600

On Thu, Apr 04, 2002 at 11:58:39AM +0100, Gregory Berkolaiko wrote:
> On Wed, 3 Apr 2002, Raimar Falke wrote:
> 
> > On Sat, Mar 23, 2002 at 03:09:07PM +0000, Gregory Berkolaiko wrote:
> > > 
> > > But first a couple of examples:
> > > ======================================================================
> > 
> > > Cached value: list of all own refuelling points of the type FUEL_CITY
> > > (basically the list of all cities)
> > 
> > IMHO the speed improvement for this is very small if only cities are
> > included. The problem are the airbases. To get these you have to
> > iterate over the whole map. What about a global airbase list? 
> > Mantained by set_special and clear_special.
> 
> Yes, this is very good idea.
> Still if you have 10 bombers and you consider them one-by-one, it make 
> sense to build the list only once.

no, this isn't a good idea (checking for airports in set/clear_special that
is). We should maintain the list where we create and/or destroy airports,
otherwise we have to do an airport check the billion other times we use
set_special. Besides, don't we have to have a list for each player?

-mike


[Prev in Thread] Current Thread [Next in Thread]