[Freeciv-Dev] (PR#3403) Government in Intelligence isn't updating
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=3403 >
In PR#9388 I said that we needed an update_intel_dlg function before we
could fix this. But actually we can make the common client changes
first quite easily. Then the GUI authors can write in support at their
leisure.
This patch does that.
I'm a bit concerned about the slowness of updating dialogs. If we get 5
player packets in a row, each containing one tiny piece of data, then
the update will be done 5 times. Not good. The solution here is to use
either a freeze/thaw solution (while the execution is in the network
code) or (equivalent but with different semantics) a queue/unqueue
solution. The latter is probably easier and would go something like:
in handle_player_info:
queue_intel_dialog_update(pplayer);
when the network code exits:
unqueue_intel_dialog_updates();
the same thing could apply to other dialogs. However I don't think we
should make this change unless we can get a measurable benefit from it.
jason
|
|