Document bandwidth optimization potential.

This commit is contained in:
Jan Vidar Krey 2009-05-16 03:45:05 +02:00
parent 968266b22f
commit b4f24b21f9
1 changed files with 7 additions and 1 deletions

View File

@ -638,6 +638,13 @@ void update_user_info(struct hub_info* hub, struct user* u, struct adc_message*
return;
}
/*
* FIXME: Optimization potential:
*
* remove parts of cmd that do not really change anything in cmd_new.
* this can save bandwidth if clients send multiple updates for information
* that does not really change anything.
*/
argument = adc_msg_get_argument(cmd, n++);
while (argument)
{
@ -839,7 +846,6 @@ int hub_handle_info(struct hub_info* hub, struct user* user, const struct adc_me
strip_network(user, cmd);
hub_handle_info_low_bandwidth(hub, user, cmd);
update_user_info(hub, user, cmd);
if (!adc_msg_is_empty(cmd))