elm/genlist: don't process entire item queue on each item add

this is a colossal waste of time. it ends up realizing every single item
immediately even if it won't be visible, which defeats the purpose of all
the batching and viewport calculations that genlist explicitly does to
avoid exactly this type of behavior

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10522
This commit is contained in:
Mike Blumenkrantz 2019-10-21 16:03:56 -04:00
parent 64b24ad3b4
commit 0fce67796b
1 changed files with 2 additions and 1 deletions

View File

@ -4928,6 +4928,7 @@ _item_queue(Elm_Genlist_Data *sd,
// FIXME: why does a freeze then thaw here cause some genlist
// elm_genlist_item_append() to be much much slower?
// evas_event_freeze(evas_object_evas_get(sd->obj));
/*
while ((sd->queue) && ((!sd->blocks) || (!sd->blocks->next)))
{
ELM_SAFE_FREE(sd->queue_idle_enterer, ecore_idle_enterer_del);
@ -4939,7 +4940,7 @@ _item_queue(Elm_Genlist_Data *sd,
ELM_SAFE_FREE(sd->queue_idle_enterer, ecore_idle_enterer_del);
_queue_process(sd);
}
*/
// evas_event_thaw(evas_object_evas_get(sd->obj));
// evas_event_thaw_eval(evas_object_evas_get(sd->obj));
evas_object_geometry_get(sd->obj, NULL, NULL, &w, NULL);