From d62e2585bb7f5661470bf694ee26eef9192ef06b Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 15 Nov 2019 11:02:01 -0800 Subject: [PATCH] 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 Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D10686 --- src/lib/elementary/efl_ui_collection_view.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/elementary/efl_ui_collection_view.c b/src/lib/elementary/efl_ui_collection_view.c index 4aca77ceb2..14122c5771 100644 --- a/src/lib/elementary/efl_ui_collection_view.c +++ b/src/lib/elementary/efl_ui_collection_view.c @@ -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)