[Freeciv-Dev] Re: Profiling Freeciv.
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thursday 04 January 2001 18:12, Gaute B Strokkenes wrote:
> Yesterday, I decided to find how profiling works and see if I could do
> anything to speed up civserver, which tends to run a bit slowly on my
> old 486 during games with large maps and lots of AIs.
>
> So, I recompiled the server with make CFLAGS="-pg -g -a -O2" and
> profiled a turn of my current game. That is, I loaded the game, hit
> the end turn button without moving or changing anything, and quit the
> server after the end / beginning of turn processing.
>
> For those who are interested, you should be able to find the savegame
> that I used at http://www.srcf.ucam.org/~gs234/newworld14.sav.bz2
> pretty soon. Note that this is a big (200 * 100) map with lots of
> cities.
>
> This is the (abbreviated) output from gprof:
> [snip]
-map_get_known can also be made into a macro.
-Looking a bit further I found that removing the ai_manage_explorer on
aiunit.c:1549 cuts execution time by 25%. I am not sure that we want to
remove it though.
-I note that find_the_shortest_path() take up a neglegtable part of the total
time; so I will keep that in mind when I find a CPU hungry way of improving
it :). Btw, compared to 1.10 it takes 1/5 the time per call...
-On my system I note that really_generate_warmap takes 2.36ms/call versus
379ms/call in 1.10 :)
-city_refresh() takes a neglegtable amount of time. We skipped some calls to
thins function because of CPU concerns, that will be revised...
Converting small functions into macros is ok, but generelly optimizations
don't have to be very ugly before I don't think it is justified for
performance IMO. Most people have a better processor than a 4x68.
(and those people who do have a 4x86 shouldn't play 15 AI games on 160x90
maps). On your system an AI turn took15 minutes, on my celeron 400 it took 1
minute. And people will continue to get faster systems.
-Thue
- [Freeciv-Dev] Profiling Freeciv., Gaute B Strokkenes, 2001/01/04
- [Freeciv-Dev] Re: Profiling Freeciv.,
Thue <=
- [Freeciv-Dev] Re: Profiling Freeciv., Tony Stuckey, 2001/01/04
- [Freeciv-Dev] Re: Profiling Freeciv., Falk Hueffner, 2001/01/05
- [Freeciv-Dev] Re: Profiling Freeciv., Gaute B Strokkenes, 2001/01/05
- [Freeciv-Dev] Re: Profiling Freeciv., Thue, 2001/01/06
- [Freeciv-Dev] Re: Profiling Freeciv., Gaute B Strokkenes, 2001/01/06
- [Freeciv-Dev] Re: Profiling Freeciv., Falk Hueffner, 2001/01/06
[Freeciv-Dev] Re: Profiling Freeciv., Gaute B Strokkenes, 2001/01/05
|
|