Remove edje text part strings when an item is unrealized
authorTae-Hwan Kim <the81.kim@samsung.com>
Sat, 21 Jul 2012 08:54:36 +0000 (17:54 +0900)
committerTae-Hwan Kim <the81.kim@samsung.com>
Sat, 21 Jul 2012 08:54:36 +0000 (17:54 +0900)
If edje text part have big text, _edje_recalc_do() takes long time.
This affects scrolling performance. So Genlist remove text string at first.

Change-Id: I72ecae2105ae76a5fdd9ce5c47bcc30f2838e1c6

src/lib/elm_genlist.c

index ea96887..6462212 100644 (file)
@@ -6364,6 +6364,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 (it->wd->reorder_it == it) return;
@@ -6378,6 +6380,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);