[gegl] buffer: add note about possible optimization
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] buffer: add note about possible optimization
- Date: Fri, 17 Dec 2010 15:41:09 +0000 (UTC)
commit 72609983562a8d510676a2c42eb7e6316d4813d1
Author: �yvind Kolås <pippin gimp org>
Date: Fri Dec 17 15:35:26 2010 +0000
buffer: add note about possible optimization
gegl/buffer/gegl-tile-handler-cache.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gegl/buffer/gegl-tile-handler-cache.c b/gegl/buffer/gegl-tile-handler-cache.c
index 0e1de0e..76f1b80 100644
--- a/gegl/buffer/gegl-tile-handler-cache.c
+++ b/gegl/buffer/gegl-tile-handler-cache.c
@@ -121,7 +121,6 @@ gegl_tile_handler_cache_dispose_buffer_tiles (gpointer itm,
{
GeglTileHandlerCache *cache = userdata;
cache->free_list = g_slist_prepend (cache->free_list, item);
-
}
}
@@ -138,6 +137,10 @@ gegl_tile_handler_cache_dispose (GObject *object)
/* only throw out items belonging to this cache instance */
cache->free_list = NULL;
+ /* XXX: for optimization this could be delayed,. or collected among multiple
+ * buffer destructions, to avoid the overhead of walking the full queue for
+ * every tiny buffer being destroyed.
+ */
g_queue_foreach (cache_queue, gegl_tile_handler_cache_dispose_buffer_tiles, cache);
for (iter = cache->free_list; iter; iter = g_slist_next (iter))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]