From 4f14e49e5ff44e4781d1fcc8ee0ff85fc99a94f9 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Thu, 26 Jul 2012 05:50:31 +0000 Subject: [PATCH] elm genlist: Enhance genlist item unrealize performance by initializing text parts first. Patch by Bluezery On Thu, Jul 26, 2012 at 2:29 PM, Bluezery wrote: > Hello, > > This patch make genlist free their text parts when each item is unrealized. > Before this patch, the item is just cached when an item is unrealized > and the text part is freed and set by other text when the cached item > is realized. > This improves scrolling performance with very long text because this > can reduce needless edje size recalculation time. > Please review this patch. > SVN revision: 74413 --- legacy/elementary/src/lib/elm_genlist.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/legacy/elementary/src/lib/elm_genlist.c b/legacy/elementary/src/lib/elm_genlist.c index 5f98c65071..72616cf3c0 100644 --- a/legacy/elementary/src/lib/elm_genlist.c +++ b/legacy/elementary/src/lib/elm_genlist.c @@ -652,6 +652,8 @@ _elm_genlist_item_unrealize(Elm_Gen_Item *it, Eina_Bool calc) { Evas_Object *content; + Eina_List *l; + const char *part; if (!it->realized) return; if (GL_IT(it)->wsd->reorder_it == it) return; @@ -665,6 +667,9 @@ _elm_genlist_item_unrealize(Elm_Gen_Item *it, it->long_timer = NULL; } + EINA_LIST_FOREACH(it->texts, l, part) + edje_object_part_text_set(VIEW(it), part, NULL); + elm_widget_stringlist_free(it->texts); it->texts = NULL; elm_widget_stringlist_free(it->contents);