forked from enlightenment/efl
elm genlist: Enhance genlist item unrealize performance by
initializing text parts first. Patch by Bluezery <ohpowel@gmail.com> On Thu, Jul 26, 2012 at 2:29 PM, Bluezery <ohpowel@gmail.com> 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
This commit is contained in:
parent
a78f99241f
commit
4f14e49e5f
|
@ -652,6 +652,8 @@ _elm_genlist_item_unrealize(Elm_Gen_Item *it,
|
||||||
Eina_Bool calc)
|
Eina_Bool calc)
|
||||||
{
|
{
|
||||||
Evas_Object *content;
|
Evas_Object *content;
|
||||||
|
Eina_List *l;
|
||||||
|
const char *part;
|
||||||
|
|
||||||
if (!it->realized) return;
|
if (!it->realized) return;
|
||||||
if (GL_IT(it)->wsd->reorder_it == it) 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;
|
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);
|
elm_widget_stringlist_free(it->texts);
|
||||||
it->texts = NULL;
|
it->texts = NULL;
|
||||||
elm_widget_stringlist_free(it->contents);
|
elm_widget_stringlist_free(it->contents);
|
||||||
|
|
Loading…
Reference in New Issue