Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] [Patch] Short worklists
Home

[Freeciv-Dev] [Patch] Short worklists

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] [Patch] Short worklists
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 25 Oct 2001 12:48:56 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

Another patch which reduces network bandwidth. This one doesn't reduce
the amount of packets but the packet size of city_info and
player_info. The current implementation of sending a worklist is quite
wasteful: it will send all MAX_LEN_WORKLIST items (even if they aren't
used). This together with the fact that the player_info packet
contains all MAX_NUM_WORKLISTS worklists result in
MAX_LEN_WORKLIST*MAX_NUM_WORKLISTS*2=512 bytes used for worklists in
the player_info packet.

  without the patch:
2:   [11]:     14 packets;    16158 bytes total;  1154 bytes/packet average
2:   [15]:    242 packets;    33254 bytes total;   137 bytes/packet average

  with the patch:
2:   [11]:     14 packets;     8446 bytes total;   603 bytes/packet average
2:   [15]:    242 packets;    26044 bytes total;   107 bytes/packet average

11 is player_info
15 is city_info

And yes these gains are quite small compared to the ones got from the
tile_info patch.

The patch is really in put_worklist and iget_worklist only. Can
someone please verify that I haven't made an error.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Of course, someone who knows more about this will correct me if I'm
  wrong, and someone who knows less will correct me if I'm right."
    -- David Palmer (palmer@xxxxxxxxxxxxxxxxxx)

Attachment: short_worklists1.diff
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] [Patch] Short worklists, Raimar Falke <=