[Freeciv-Dev] (PR#11562) Freeciv Server Performance
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=11562 >
> [jdorje - Fri Dec 17 20:02:44 2004]:
> The most interesting feature is cm_query_result which is 33% of the runtime.
If I'm reading this correctly, about 40% the cm_query_result calls
are due to auto_arrange_worker being stupid: it is recursive, so if
two tiles change at the same time, then you call cm_query_result
twice as often. This happens when you transfer ownership of a
city (not to the city that changed, but to its neighbours), or when
you explore near a city, and maybe other times.
This is silly, and I've been meaning to fix it for a while, but there wasn't
the freeze mechanism that now makes that fix easy. Here's a patch,
tested (it actually avoids some calls, but I didn't profile it).
- prepend 'city' to freeze_worker / thaw_worker; make them global
- use in auto_arrange_workers
Description: Binary data
- [Freeciv-Dev] (PR#11562) Freeciv Server Performance,
Benoit Hudson <=