elementary: reduce event trigger during object creation stage in Efl.Ui.CollectionView.

Once the object are created, the CollectionView will do a few modifiction on them before
giving this object to the position manager to deal with. Reducing events should slightly
improve performance.

Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10686
This commit is contained in:
Cedric BAIL 2019-11-15 11:02:01 -08:00 committed by Marcel Hollerbach
parent b9e0d25a4c
commit d62e2585bb
1 changed files with 7 additions and 0 deletions

View File

@ -520,6 +520,10 @@ _entity_fetched_cb(Eo *obj, void *data, const Eina_Value v)
unsigned int i, len;
uint64_t updated_size_start_id = 0, updated_entity_start_id = 0;
Eina_Bool updated_size = EINA_FALSE, updated_entity = EINA_FALSE;
Evas *e;
e = evas_object_evas_get(obj);
evas_event_freeze(e);
EINA_VALUE_ARRAY_FOREACH(&v, len, i, child)
{
@ -627,6 +631,9 @@ _entity_fetched_cb(Eo *obj, void *data, const Eina_Value v)
}
}
evas_event_thaw(e);
evas_event_thaw_eval(e);
// Currently position manager will flush its entire size cache on update, so only do
// it when necessary to improve performance.
if (updated_size || request->need_size)