My sparc64 502mhz is taking 4 minutes now to /save a game. I tried poor
mans optimization and inlined a couple of functions. I tested it on a
8x3400mhz intel i7. The test .serv was loading the game, and saving it
10 times. I managed to only go down to 11.76 from 13.56 seconds, that's
not very much. Most of the time is spent doing real stuff, so i guess
500mhz is not adequate to run games with max map. About 5 seconds of
that time is just starting the server and loading the map.

The function tile_index is called 495681563 times, I cant see how this
can be cut down.

sg_save_player_vision is called 370 times and takes most time, 12%. But
it seems to be doing real stuff, also hard to cut down. And even if it
is cut down, it's still only 12%.

A decent computer saves the game rather fast, so I just guess my
computer is just too old to run longturn games.

However, I think that inlining functions like:
int player_slot_count(void)
would actually not only be faster, but also take less space.

Michal Mazurek

Freeciv-dev mailing list

Reply via email to