hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7c08d7b97cbb4b1f979e3b01f0a7e150ed093b54

commit 7c08d7b97cbb4b1f979e3b01f0a7e150ed093b54
Author: subhransu mohanty <[email protected]>
Date:   Thu Aug 22 10:53:36 2019 +0900

    edje/style: Avoid unnecessary evas_textblock_style computation.
    
    Summary:
    If the style is not readonly we always compute the style again when
    requested by edje. so this computation is unnecessary.
    By avoiding the computation here we will avoid style computation of all the 
styles in the edje
    that is not readonly hence saving memory.
    
    Reviewers: ali.alzyod, Hermet, cedric, raster
    
    Subscribers: cedric, #reviewers, #committers
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D9693
---
 src/lib/edje/edje_textblock_styles.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lib/edje/edje_textblock_styles.c 
b/src/lib/edje/edje_textblock_styles.c
index cb4a9c3a7a..ece7b76e93 100644
--- a/src/lib/edje/edje_textblock_styles.c
+++ b/src/lib/edje/edje_textblock_styles.c
@@ -440,8 +440,9 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf)
 
              if (tag->text_class) stl->readonly = EINA_FALSE;
           }
-        /* Configure the style */
-        evas_textblock_style_set(stl->style, 
eina_strbuf_string_get(styleBuffer));
+        /* Configure the style  only if it will never change again*/
+        if (stl->readonly)
+          evas_textblock_style_set(stl->style, 
eina_strbuf_string_get(styleBuffer));
      }
 
    if (fontsource) free(fontsource);

-- 


Reply via email to