forked from enlightenment/efl
eet: Don't add duplicate hashes to eet freelist
The eet freelist code de-duplicates pointers, so passing duplicates is just fine, however it does waste time doing the de-dup. We know when we have a duplicate anyway, so save the time. Differential Revision: https://phab.enlightenment.org/D7279 Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
This commit is contained in:
parent
cd44bdeac6
commit
5889307f4c
|
@ -3931,9 +3931,12 @@ eet_data_get_hash(Eet_Free_Context *context,
|
|||
|
||||
if (edd)
|
||||
{
|
||||
void *oldhash = hash;
|
||||
|
||||
hash = edd->func.hash_add(hash, key, data_ret);
|
||||
*ptr = hash;
|
||||
_eet_freelist_hash_add(context, hash);
|
||||
if (oldhash != hash)
|
||||
_eet_freelist_hash_add(context, hash);
|
||||
}
|
||||
else
|
||||
eet_node_hash_add(*((Eet_Node **)data), echnk->name, key, data_ret);
|
||||
|
|
Loading…
Reference in New Issue