Compare commits

...

4 Commits

Author SHA1 Message Date
junsu choi 0febbf71ff 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
2020-05-12 10:01:12 -04:00
junsu choi 89eabfc596 Efl.Ui.Check_Legacy: Prevent unnecessary signal emit for contents
Summary:
When call elm_check_add, theme_apply of layout is called and
_efl_ui_check_legacy_efl_ui_widget_theme_apply is called.
Then it calls the signal emit for the icon.
this call is unnecessary.

Test Plan: N/A

Reviewers: akanad, Jaehyun_Cho, Hermet, YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11812
2020-05-12 10:01:09 -04:00
junsu choi e7d25a37f5 Efl.Ui.Progressbar_Legacy: Prevent unnecessary signal emit for contents
Summary:
When call elm_progressbar_add, theme_apply of layout is called and
_efl_ui_progressbar_legacy_efl_ui_widget_theme_apply is called.
Then it calls the signal emit for the icon.
this call is unnecessary.

Test Plan: N/A

Reviewers: Hermet, bowonryu, Jaehyun_Cho, YOhoho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11811
2020-05-12 10:01:05 -04:00
junsu choi e882999a0f Efl.Ui.Button_Legacy: Prevent duplicate signal emit of contents
Summary:
When call elm_button_add, theme_apply of layout is called and
_efl_ui_button_legacy_efl_ui_widget_theme_apply is called.
Then it calls the signal emit for the icon.
In the button theme, the default of the icon is hidden,
so this call is unnecessary.

Test Plan:
Evas_Object *bt;
clock_t start, finish;
start = clock();
bt = elm_button_add(win);
finish = clock();
printf("duration : %f\n", (double)(finish-start)/CLOCKS_PER_SEC);

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_button_add(win);
     finish = clock();
     sum += (double)(finish-start)/CLOCKS_PER_SEC;
  }
avg = sum / cnt ;
printf("button avg : %f %f\n",avg, sum);

[before]
button avg : 0.000215

[after]
button avg : 0.000138

Reviewers: Hermet, YOhoho, Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11810
2020-05-12 10:01:01 -04:00
4 changed files with 4 additions and 4 deletions

View File

@ -422,7 +422,7 @@ _efl_ui_button_legacy_efl_ui_widget_theme_apply(Eo *obj, void *_pd EINA_UNUSED)
int_ret = efl_ui_widget_theme_apply(efl_super(obj, EFL_UI_BUTTON_LEGACY_CLASS));
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_icon_signal_emit(obj);
if (efl_finalized_get(obj)) _icon_signal_emit(obj);
return int_ret;
}

View File

@ -481,7 +481,7 @@ _efl_ui_check_legacy_efl_ui_widget_theme_apply(Eo *obj, void *_pd EINA_UNUSED)
int_ret = efl_ui_widget_theme_apply(efl_super(obj, EFL_UI_CHECK_LEGACY_CLASS));
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_icon_signal_emit(obj);
if (efl_finalized_get(obj)) _icon_signal_emit(obj);
return int_ret;
}

View File

@ -771,7 +771,7 @@ _efl_ui_progressbar_legacy_efl_ui_widget_theme_apply(Eo *obj, void *_pd EINA_UNU
int_ret = efl_ui_widget_theme_apply(efl_super(obj, EFL_UI_PROGRESSBAR_LEGACY_CLASS));
if (int_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC) return int_ret;
_icon_signal_emit(obj);
if (efl_finalized_get(obj)) _icon_signal_emit(obj);
return int_ret;
}

View File

@ -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;
}