Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] Re: freeciv profile data
Home

[Freeciv-Dev] Re: freeciv profile data

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: freeciv profile data
From: Jason Short <jshort@xxxxxxxxxxxxxx>
Date: Mon, 20 Oct 2003 11:47:05 -0400
Reply-to: jdorje@xxxxxxxxxxxx

Per I. Mathisen wrote:
On Sun, 19 Oct 2003, Jason Short wrote:

I made a few profiles of current freeciv.

...

FYI, some of the biggest CPU consumers are:

ai_manage_cities - 55% of execution time
military_advisor_choose_build - 27%
contemplate_new_city - 13%
ai_manage_units - 25% of execution time

these are simple to profile since they're all called in just one place.
Together this is 80% of the server runtime.


Not surprising, really. However, this info is useful:

find_something_to_kill
auto_arrange_workers

both consume approx 20% of server's CPU time. Fewer calls to aaw should be
possible, and fstk should be canned.

Most calls to auto_arrange_workers claim to be from ai_manage_city or ai_best_government. I don't think these can be reduced.

But the recursive nature of the function is a bit confusing. There is data for aaw <cycle 1> but no other aaw. In theory it should recurse a fair amount, but only 5 calls are reported from update_city_tile_status.

The main culprit in aaw is of course the CM. cm_query_result is 18%. It is called 1.06 times for every aaw call.

Also, generic_city_refresh takes 6% CPU time, and could probably easily be
improved by some inlining of its utility functions.

The main caller is real_fill_out_result.  Again CM.

jason



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