Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2005:
[Freeciv-Dev] (PR#11562) Freeciv Server Performance
Home

[Freeciv-Dev] (PR#11562) Freeciv Server Performance

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: kaufman@xxxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#11562) Freeciv Server Performance
From: "Benoit Hudson" <bh@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 10 Jan 2005 19:57:15 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=11562 >

> [jdorje - Fri Dec 17 21:55:39 2004]:
> Right now I'm looking most closely at the auto_arrange_workers call in 
> update_city_tile_status().  This is called any time an enemy unit makes 
> a worked tile unavailable.  This call seems to account for 2/3 of the 
> aaw calls and 20% of the overall server runtime.  This call is 
> fundamentally unnecessary, but fixing it isn't that easy.  However a 
> simple greedy algorithm to move a SINGLE worker would be the best way to 
> fix it (currently we place all workers from scratch).

How about: update_city_tile_status just moves the worker into an elvis.

The client can run the CM immediately upon getting the update
about the new tile status, if it so desires.  Never call the CM for the 
client, except when the player acquires a new city.

For AI players, put the city on a list of cities on which to call 
auto_arrange_workers at the end of the turn.

With this, we get optimal arrangement for the AI without 
recomputing it all turn long; similarly we get it for the client
without overloading the server.



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