Follow-up Comment #2, patch #1446 (project freeciv):

1 & 2) I have already thought about a such solution for numerous structures
of Freeciv. However, this is quite problematic. Most ruleset types for
example need a translation support that need a gettext() pointer, which
cannot be used in a packet structure.

The delta code actually has some disadvantages that could be solved with lot
of works. Actually, it doesn't send the packet structure through the network.
It checks all values computed in it and send field per field and ignores
changed fields. So, probably the packet structure could be avoided for
sending. We could use accessors instead (like inline functions to read a
field of a structure).

In receiving side, it is quite worse. For example, a client receiving a
packet_city_info that only 1 field changed and was actually received, checks
for all fields to make updates (in client/packhand.c). This make the client
quite slow, especially with unit moves. A similar solution could be done,
dropping the packet concept. common/packets_gen.c could call a function for
each changed field that would probably save lot of time.

This is of course not a part of this item, unfortunately...


Reply to this item at:


  Message posté via/par Gna!

Freeciv-dev mailing list

Reply via email to