[Freeciv-Dev] Re: [Patch][RFC] Reduce superfluous tile_info packets
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Raimar Falke wrote:
>
> The attached patch is a rough first version of a patch which change
> the server to only sent tile information if this information has
> really changed.
>
> Test: loading a normal game (1600AD) and pressing three times return.
> Results (packet type 7 is tile info):
>
> without patch:
> 2: [ 7]: 41882 packets; 376938 bytes total; 9 bytes/packet average
> 2: transmitted 534864 bytes in 44000 packets;average size per packet 12 bytes
>
> with patch:
> 2: [ 7]: 4076 packets; 36684 bytes total; 9 bytes/packet average
> 2: transmitted 185739 bytes in 6000 packets;average size per packet 30 bytes
>
> Note that 4000 packets are needed at the start to transfer all tiles
> to the client. The human player has the Apollo Program.
Wow, is that for real?
Some technical comments:
The "n" parameter of map_tile_set_changed does nothing, right? It's just a
temporary debugging tool?
What is the purpose of base_map_[set|clear]_special? In
map_[set|clear]_special, you can't call MAP_TILE before normalizing (until
we move to the check_map_pos system, anyway).
What about a macro to turn this
- MAP_TILE(x, y)->continent = val;
+ if (MAP_TILE(x, y)->continent != val) {
+ MAP_TILE(x, y)->continent = val;
+ map_tile_set_changed(x, y, NULL, 0);
+ }
into
#define MAP_SET(x, y, identifier, value, player) \
{ \
if (MAP_TILE(x, y)->identifier != value) { \
MAP_TILE(x, y)->identifier = value; \
map_tile_set_changed(x, y, player); \
} \
}
MAP_SET(x, y, continent, val, NULL);
jason
- [Freeciv-Dev] [Patch][RFC] Reduce superfluous tile_info packets, Raimar Falke, 2001/10/24
- [Freeciv-Dev] Re: [Patch][RFC] Reduce superfluous tile_info packets,
Jason Dorje Short <=
- [Freeciv-Dev] Re: [Patch][RFC] Reduce superfluous tile_info packets, Raahul Kumar, 2001/10/24
- [Freeciv-Dev] Re: [Patch][RFC] Reduce superfluous tile_info packets, Raimar Falke, 2001/10/25
- [Freeciv-Dev] Re: [Patch][RFC] Reduce superfluous tile_info packets, Karl-Ingo Friese, 2001/10/25
- [Freeciv-Dev] Re: [Patch][RFC] Reduce superfluous tile_info packets, Raahul Kumar, 2001/10/25
- [Freeciv-Dev] Re: [Patch][RFC] Reduce superfluous tile_info packets, Raimar Falke, 2001/10/25
- [Freeciv-Dev] Re: [Patch][RFC] Reduce superfluous tile_info packets, Raahul Kumar, 2001/10/25
- [Freeciv-Dev] Re: [Patch][RFC] Reduce superfluous tile_info packets, Michael Stefaniuc, 2001/10/25
- [Freeciv-Dev] Re: [Patch][RFC] Reduce superfluous tile_info packets, Raahul Kumar, 2001/10/25
- [Freeciv-Dev] Re: [Patch][RFC] Reduce superfluous tile_info packets, Jason Dorje Short, 2001/10/25
|
|