<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39659 >

On 02/09/07, Marko Lindqvist  wrote:
>  If attribute block consist of several attribute chunks, hash each
> chunk separately. This avoids sending all the chunks as changed.
>  In theory, at least. Compilation problems have so far prevented me
> from actually testing this.

 In practice, chunk of 1400 bytes never stays identical between two sends.

 So it also needed more fine grained checking for identical parts of chunk.

 With this patch network traffic caused by attribute blocks went from
15000 to 2000 bytes in my regression test.

 This requires capability change; old versions do not store
information and new versions are not resending it.

 - ML

diff -Nurd -X.diff_ignore freeciv/common/packets.def freeciv/common/packets.def
--- freeciv/common/packets.def	2007-09-02 05:15:08.000000000 +0300
+++ freeciv/common/packets.def	2007-09-04 16:33:40.000000000 +0300
@@ -716,9 +716,10 @@
 PACKET_PLAYER_ATTRIBUTE_CHUNK=47; pre-send, sc,cs,handle-via-packet
-  UINT32 offset, total_length, chunk_length;
+  UINT32 offset; key
+  UINT32 total_length, chunk_length;
   /* to keep memory management simple don't allocate dynamic memory */
-  MEMORY data[ATTRIBUTE_CHUNK_SIZE:chunk_length];
+  MEMORY data[ATTRIBUTE_CHUNK_SIZE:chunk_length]; diff
 /************** Unit packets **********************/
Freeciv-dev mailing list

Reply via email to