URL:
<http://gna.org/patch/?4327>
Summary: Keep agents call list sorted on insertion rather
than sorting on every removal
Project: Freeciv
Submitted by: jtn
Submitted on: Sat Dec 7 13:39:08 2013
Category: client
Priority: 5 - Normal
Status: In Progress
Privacy: Public
Assigned to: jtn
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Planned Release: 2.4.2,2.5.0,2.6.0
_______________________________________________________
Details:
As noted in bug #20940, the call list maintained by the agent machinery sorts
the whole list every time it removes an element; it would probably be quicker
to put the element in the right place when enqueueing it.
I've minimally smoke-tested this with a toy game with a few cities with the
CMA agent, but I'm not sure how to rigorously test it:
* Agents are client-side so not amenable to autogame testing
* The precise dequeue order previously depended on the vagaries of qsort() so
is expected to have changed
* The list is sorted by level and we currently only have one level
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?4327>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev