From b4f24b21f9bc1d1431206813c3a58b9c9e4bf258 Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Sat, 16 May 2009 03:45:05 +0200 Subject: [PATCH] Document bandwidth optimization potential. --- src/inf.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/inf.c b/src/inf.c index b1a4c3b..56223ca 100644 --- a/src/inf.c +++ b/src/inf.c @@ -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))