forked from enlightenment/efl
edje: last improvement of _edje_hash_find_helper speed by reducing call to eina split function.
This commit is contained in:
parent
eddd52cba7
commit
6bbcb3cc15
|
@ -5354,6 +5354,15 @@ _edje_hash_find_helper(const Eina_Hash *hash, const char *key)
|
|||
if (remember_key == key)
|
||||
return NULL;
|
||||
|
||||
// It is usually faster to walk the string once to check
|
||||
// if there will be any tokens to process, that to allocate
|
||||
// an array, copy one token, and then just free it.
|
||||
if (strchr(key, '/') == NULL)
|
||||
{
|
||||
remember_key = key;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
tokens = eina_str_split_full(key, "/", 0, &tokens_count);
|
||||
if ((tokens) && (tokens_count > 1))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue