summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-11-15 11:02:01 -0800
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-12-11 11:11:57 +0100
commitd62e2585bb7f5661470bf694ee26eef9192ef06b (patch)
tree1b9430e137a9c2cf0be0ed22ee8b2385cd4c3f11
parentb9e0d25a4c44cbeae5e2a18380113181281c9f3e (diff)
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
-rw-r--r--src/lib/elementary/efl_ui_collection_view.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_collection_view.c b/src/lib/elementary/efl_ui_collection_view.c
index 4aca77c..14122c5 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)
520 unsigned int i, len; 520 unsigned int i, len;
521 uint64_t updated_size_start_id = 0, updated_entity_start_id = 0; 521 uint64_t updated_size_start_id = 0, updated_entity_start_id = 0;
522 Eina_Bool updated_size = EINA_FALSE, updated_entity = EINA_FALSE; 522 Eina_Bool updated_size = EINA_FALSE, updated_entity = EINA_FALSE;
523 Evas *e;
524
525 e = evas_object_evas_get(obj);
526 evas_event_freeze(e);
523 527
524 EINA_VALUE_ARRAY_FOREACH(&v, len, i, child) 528 EINA_VALUE_ARRAY_FOREACH(&v, len, i, child)
525 { 529 {
@@ -627,6 +631,9 @@ _entity_fetched_cb(Eo *obj, void *data, const Eina_Value v)
627 } 631 }
628 } 632 }
629 633
634 evas_event_thaw(e);
635 evas_event_thaw_eval(e);
636
630 // Currently position manager will flush its entire size cache on update, so only do 637 // Currently position manager will flush its entire size cache on update, so only do
631 // it when necessary to improve performance. 638 // it when necessary to improve performance.
632 if (updated_size || request->need_size) 639 if (updated_size || request->need_size)