forked from enlightenment/efl
edje: optimize color_class_recursive_find_helper() function
Summary: If the color_class is not overridden by the object level the hash will be empty but still we do the expensive call to _edje_hash_find_helper() find the color_class in an empty hash. by checking if the hash is empty and returning early we save lot of unnecessary hash computaion and lookup. Reviewers: Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9532
This commit is contained in:
parent
da39f53b95
commit
1b94d90d53
|
@ -5722,6 +5722,8 @@ _edje_color_class_recursive_find_helper(const Edje *ed, Eina_Hash *hash, const c
|
|||
Edje_Color_Tree_Node *ctn = NULL;
|
||||
const char *parent;
|
||||
|
||||
if (!eina_hash_population(hash)) return NULL;
|
||||
|
||||
cc = _edje_hash_find_helper(hash, color_class);
|
||||
if (cc) return cc;
|
||||
else if (ed->file)
|
||||
|
|
Loading…
Reference in New Issue