summaryrefslogtreecommitdiff
path: root/src/lib/eet
diff options
context:
space:
mode:
authorDerek Foreman <derek.foreman.samsung@gmail.com>2018-11-13 13:26:13 -0600
committerDerek Foreman <derek.foreman.samsung@gmail.com>2018-11-16 12:16:07 -0600
commit5889307f4cae1a1ff04eba1631853b605283aaf8 (patch)
treede3a65ebf3f3a140f57aafdb6f98e2d13458c10d /src/lib/eet
parentcd44bdeac66d0be8a67003eb6b6bfe699eee33d0 (diff)
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>
Diffstat (limited to 'src/lib/eet')
-rw-r--r--src/lib/eet/eet_data.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/eet/eet_data.c b/src/lib/eet/eet_data.c
index 4333559253..cf3e72d3cb 100644
--- a/src/lib/eet/eet_data.c
+++ b/src/lib/eet/eet_data.c
@@ -3931,9 +3931,12 @@ eet_data_get_hash(Eet_Free_Context *context,
3931 3931
3932 if (edd) 3932 if (edd)
3933 { 3933 {
3934 void *oldhash = hash;
3935
3934 hash = edd->func.hash_add(hash, key, data_ret); 3936 hash = edd->func.hash_add(hash, key, data_ret);
3935 *ptr = hash; 3937 *ptr = hash;
3936 _eet_freelist_hash_add(context, hash); 3938 if (oldhash != hash)
3939 _eet_freelist_hash_add(context, hash);
3937 } 3940 }
3938 else 3941 else
3939 eet_node_hash_add(*((Eet_Node **)data), echnk->name, key, data_ret); 3942 eet_node_hash_add(*((Eet_Node **)data), echnk->name, key, data_ret);