# HG changeset patch # User Mikael Berthe # Date 1269297541 -3600 # Node ID fb6d20a175841fcd199f3829e98d76bf716c19f5 # Parent 6ac5718f8d256b63acc9c1d3513ef13fd75e3631 Improve hbuf_remove_receipt() efficiency Do not use g_list_first() (that is, start searching from the bottom of the buffer). diff -r 6ac5718f8d25 -r fb6d20a17584 mcabber/mcabber/hbuf.c --- a/mcabber/mcabber/hbuf.c Mon Mar 22 22:39:47 2010 +0100 +++ b/mcabber/mcabber/hbuf.c Mon Mar 22 23:39:01 2010 +0100 @@ -485,9 +485,9 @@ { hbuf_block *blk; - hbuf = g_list_first(hbuf); + hbuf = g_list_last(hbuf); - for ( ; hbuf; hbuf = g_list_next(hbuf)) { + for ( ; hbuf; hbuf = g_list_previous(hbuf)) { blk = (hbuf_block*)(hbuf->data); if (blk->prefix.xep184 == xep184) { blk->prefix.xep184 = NULL;