summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-06-15 00:06:42 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-06-15 08:43:51 +0100
commitc2d1aaaed6b5cb7a30930d950f0490750d33eb1e (patch)
tree9db8c1a44fed33e059dbf5dcc7a1b4780e6f4f72 /src
parent613e1715be1114c2221f1a12f067e3d1e215265f (diff)
edje messages - on del use the per edje message list not global
this massively cuts the walk to remove messages to only what's needed on teardown ... so yay! speedup.
Diffstat (limited to 'src')
-rw-r--r--src/lib/edje/edje_message_queue.c34
1 files changed, 10 insertions, 24 deletions
diff --git a/src/lib/edje/edje_message_queue.c b/src/lib/edje/edje_message_queue.c
index 0257127969..db5542b06e 100644
--- a/src/lib/edje/edje_message_queue.c
+++ b/src/lib/edje/edje_message_queue.c
@@ -953,32 +953,18 @@ _edje_message_del(Edje *ed)
953 Edje_Message *em; 953 Edje_Message *em;
954 954
955 if (ed->message.num <= 0) return; 955 if (ed->message.num <= 0) return;
956 /* delete any messages on the main queue for this edje object */ 956 // delete any messages on the main or tmp queue for this edje object
957 for (l = msgq; l; l = ln) 957 for (l = ed->messages; l; l = ln)
958 {
959 ln = l->next;
960 em = INLIST_CONTAINER(Edje_Message, l, inlist_main);
961 if (em->edje == ed)
962 {
963 msgq = eina_inlist_remove(msgq, &(em->inlist_main));
964 em->edje->message.num--;
965 em->edje->messages = eina_inlist_remove(em->edje->messages, &(em->inlist_edje));
966 _edje_message_free(em);
967 }
968 if (ed->message.num <= 0) return;
969 }
970 /* delete any on the processing queue */
971 for (l = tmp_msgq; l; l = ln)
972 { 958 {
973 ln = l->next; 959 ln = l->next;
974 em = INLIST_CONTAINER(Edje_Message, l, inlist_main); 960 em = INLIST_CONTAINER(Edje_Message, l, inlist_edje);
975 if (em->edje == ed) 961 em->edje->message.num--;
976 { 962 if (em->in_tmp_msgq)
977 tmp_msgq = eina_inlist_remove(tmp_msgq, &(em->inlist_main)); 963 tmp_msgq = eina_inlist_remove(tmp_msgq, &(em->inlist_main));
978 em->edje->message.num--; 964 else
979 em->edje->messages = eina_inlist_remove(em->edje->messages, &(em->inlist_edje)); 965 msgq = eina_inlist_remove(msgq, &(em->inlist_main));
980 _edje_message_free(em); 966 em->edje->messages = eina_inlist_remove(em->edje->messages, &(em->inlist_edje));
981 } 967 _edje_message_free(em);
982 if (ed->message.num <= 0) return; 968 if (ed->message.num <= 0) return;
983 } 969 }
984} 970}