Complete.Org: Mailing Lists: Archives: freeciv-ai: August 2004:
[freeciv-ai] Re: (PR#9802) generic_city_refresh speedup via caching

[freeciv-ai] Re: (PR#9802) generic_city_refresh speedup via caching

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bh@xxxxxxxxxxxxxxxxxxx
Subject: [freeciv-ai] Re: (PR#9802) generic_city_refresh speedup via caching
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Wed, 25 Aug 2004 12:39:05 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: >

On Wed, 25 Aug 2004, Jason Short wrote:
> > [bhudson - Wed Aug 25 01:26:21 2004]:
> >
> > The major cost in the CM (>50%) is generic_city_refresh ; that's why
> > we maintain all the
> > fancy caches which distribute assumptions about game rules.Looking
> > at why this one
> > function was so slow, I discovered it's because it computes a bunch of
> > stuff that doesn't
> > change across calls withing the CM -- which buildings exist, distance
> > to the capital, etc etc.
> Assuming the effects patch gets committed soon, I'd rather wait until
> that's done (your patch touches some building effects code). But if
> nothing happens on it soon (~1 week) we should go forward with this.
> This code is a bit complicated so if there's a way to split it up that
> would be helpful.

Please wait. This work is very important (thank you, Benoit), but also
important to get right. I have been looking at this area of code (city.c)
a lot lately, and want to have a closer look at this patch when I get the

  - Per

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