Hi Albrecht,

On 02/26/2020 01:42:55 PM Wed, Albrecht Dreß wrote:
Hi Peter!

Am 25.02.20 18:39 schrieb(en) Peter Bloomfield:
If you get a chance, could you get back traces for all threads?

As it's actually easy to reproduce, here is the latest CPU hog:
…

The other threads all look well behaved, so it must be the main thread. Could 
you run with the attached patch? If the issue is one of the recent changes, 
you'll get messages spewed all over the console. If not, it must be some other 
idle handler that's somehow been impacted by them, which will be harder to find!

Thanks,

Peter
diff --git a/libbalsa/mailbox.c b/libbalsa/mailbox.c
index d8cd283f3..b9f315be8 100644
--- a/libbalsa/mailbox.c
+++ b/libbalsa/mailbox.c
@@ -2344,6 +2344,7 @@ lbm_sort_idle_cb(LibBalsaMailbox * mailbox)
 
     if (!priv->messages_threaded) {
         libbalsa_unlock_mailbox(mailbox);
+g_print("%s reschedules idle\n", __func__);
         return G_SOURCE_CONTINUE;
     }
 
diff --git a/libbalsa/mailbox_local.c b/libbalsa/mailbox_local.c
index 0fa1e62c8..201aae3b1 100644
--- a/libbalsa/mailbox_local.c
+++ b/libbalsa/mailbox_local.c
@@ -1171,6 +1171,7 @@ lbml_set_threading_idle_cb(LibBalsaMailboxLocal *local)
         if (!priv->messages_loaded) {
             libbalsa_unlock_mailbox(mailbox);
 
+g_print("%s reschedules idle\n", __func__);
             return G_SOURCE_CONTINUE;
         }
 
diff --git a/src/balsa-index.c b/src/balsa-index.c
index fca4d30e3..dfdaf2c77 100644
--- a/src/balsa-index.c
+++ b/src/balsa-index.c
@@ -823,13 +823,16 @@ bndx_scroll_on_open_idle(BalsaIndex *bindex)
     mailbox = balsa_mailbox_node_get_mailbox(bindex->mailbox_node);
 
     if (!libbalsa_mailbox_get_messages_threaded(mailbox))
+{g_print("%s reschedules idle 1\n", __func__);
         return TRUE; /* G_SOURCE_CONTINUE */
+}
 
     if (balsa_app.expand_tree &&
         libbalsa_mailbox_get_threading_type(mailbox) != LB_MAILBOX_THREADING_FLAT &&
         !bindex->expanded) {
         gtk_tree_view_expand_all(tree_view);
         bindex->expanded = TRUE;
+g_print("%s reschedules idle 2\n", __func__);
         return TRUE; /* G_SOURCE_CONTINUE */
     }
 

Attachment: pgpmmFKFbDo6X.pgp
Description: PGP signature

_______________________________________________
balsa-list mailing list
balsa-list@gnome.org
https://mail.gnome.org/mailman/listinfo/balsa-list

Reply via email to