From 3f4587ede831760b2f6976960658d202c9d847ff Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sun, 9 Sep 2007 18:21:14 +0000 Subject: a lot of changes. client side prediction added --- src/engine/snapshot.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/engine/snapshot.c') diff --git a/src/engine/snapshot.c b/src/engine/snapshot.c index b9c832a2..b42b0157 100644 --- a/src/engine/snapshot.c +++ b/src/engine/snapshot.c @@ -21,7 +21,7 @@ int snapshot_get_item_datasize(SNAPSHOT *snap, int index) int snapshot_get_item_index(SNAPSHOT *snap, int key) { - /* TODO: this should not be a linear search. very bad */ + /* TODO: OPT: this should not be a linear search. very bad */ int i; for(i = 0; i < snap->num_items; i++) { @@ -135,6 +135,8 @@ static void undiff_item(int *past, int *diff, int *out, int size) } } + +// TODO: OPT: this should be made much faster int snapshot_create_delta(SNAPSHOT *from, SNAPSHOT *to, void *dstdata) { SNAPSHOT_DELTA *delta = (SNAPSHOT_DELTA *)dstdata; -- cgit 1.4.1