From 0febbf71ff54d06174e8f22b48741e897053f9d5 Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Tue, 12 May 2020 10:01:12 -0400 Subject: Efl.Ui.Radio_Legacy: Prevent unnecessary signal emit for contents Summary: When call elm_radio_add, theme_apply of layout is called and _efl_ui_radio_legacy_efl_ui_widget_theme_apply is called. Then it calls the signal emit for the icon. this call is unnecessary. Test Plan: Evas_Object *bt; clock_t start, finish; double sum= 0 ; double avg = 0; double cnt = 1000; for(int i =0 ; i<(int)cnt; i++) { start = clock(); bt = elm_radio_add(win); finish = clock(); sum += (double)(finish-start)/CLOCKS_PER_SEC; } avg = sum / cnt ; printf("radio avg : %f\n",avg); [before] radio avg : 0.000232 [after] radio avg : 0.000197 Reviewers: akanad, Jaehyun_Cho, Hermet, YOhoho Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11813 --- src/lib/elementary/efl_ui_radio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_radio.c b/src/lib/elementary/efl_ui_radio.c index e631cb81f3..34a82c737c 100644 --- a/src/lib/elementary/efl_ui_radio.c +++ b/src/lib/elementary/efl_ui_radio.c @@ -365,7 +365,7 @@ _efl_ui_radio_legacy_efl_ui_widget_theme_apply(Eo *obj, void *_pd EINA_UNUSED) /* FIXME: replicated from elm_layout just because radio's icon * spot is elm.swallow.content, not elm.swallow.icon. Fix that * whenever we can changed the theme API */ - _icon_signal_emit(obj); + if (efl_finalized_get(obj)) _icon_signal_emit(obj); return int_ret; } -- cgit v1.2.1