Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2001:
[Freeciv-Dev] Re: [Patch] City management agent
Home

[Freeciv-Dev] Re: [Patch] City management agent

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Thue <thue@xxxxxxx>
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [Patch] City management agent
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 8 Feb 2001 17:06:59 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxxxx

On Tue, Feb 06, 2001 at 10:07:52PM +0100, Thue wrote:
> On Tuesday 06 February 2001 22:01, Raimar Falke wrote:
> > On Tue, Feb 06, 2001 at 09:07:59PM +0100, Thue wrote:
> > > > performance: (all with a local server) with a city of size 8 and cold
> > > > caches:
> > > >   2: cma_query_result: overall=2.784365s waiting at network=2.614204s
> > > >   2: cma_query_result: requests=72 time per request=36.308000ms
> > > >
> > > > So the agent waits 72 times for the server. This are 94% of the total
> > > > time. If the agent waits for each packet individually the time per
> > > > request is constant 20ms+-1ms. So there may be some constant overhead
> > > > in the network stac of the OS or in the freeciv client/server.
> > >
> > > And how well will this work for me on civserver to which I have 1s lag?
> >
> > I would suspect it won't work in a way which you want to play. So
> > there has to be some way for the client "to calculate a city". The
> > methods of the server to do this needs to be streamlined, exported and
> > moved to common.

Ok the attached patch does:
 - moves server/cityturn.c:city_refresh() to common/city.c as
   generic_city_refresh()
 - changed return type to void
 - moves all needed helper functions to common/city.c
 - makes as much functions as possible static
 - reformats the functions

This should enable client side code to exactly predict the city
production for various arrangements of the city population.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  Tank: So what do you need? Besides a miracle.
  Neo: Guns. Lots of guns.
    -- From The Matrix

Attachment: generic_city_refresh-1.diff.gz
Description: GNU Zip compressed data


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