Re: Balsa git master consumes 100% CPU

2020-01-16 Thread Peter Bloomfield

On 01/16/2020 01:25:54 PM Thu, Albrecht Dreß wrote:

Hi Peter!

Am 15.01.20 21:30 schrieb(en) Peter Bloomfield:

I just pushed a commit (7a01d8db6) with a fix for another cpu-pegging bug All 
my problematic mailboxes now load correctly, empty or otherwise. Please check 
it when you get a chance!


Yes!!  I can confirm that your latest patch apparently fixes the issue – all 
“offending” mailboxes (both MBox and Maildir) now open without hogging the cpu.


Good to know--thanks for checking!

Peter

pgpewm3TYzQXt.pgp
Description: PGP signature
___
balsa-list mailing list
balsa-list@gnome.org
https://mail.gnome.org/mailman/listinfo/balsa-list


Re: Balsa git master consumes 100% CPU

2020-01-16 Thread Albrecht Dreß

Hi Peter!

Am 15.01.20 21:30 schrieb(en) Peter Bloomfield:

I just pushed a commit (7a01d8db6) with a fix for another cpu-pegging bug. All 
my problematic mailboxes now load correctly, empty or otherwise. Please check 
it when you get a chance!


Yes!!  I can confirm that your latest patch apparently fixes the issue – all 
“offending” mailboxes (both MBox and Maildir) now open without hogging the cpu.

Cheers,
Albrecht.

pgpupIc3c9Krq.pgp
Description: PGP signature
___
balsa-list mailing list
balsa-list@gnome.org
https://mail.gnome.org/mailman/listinfo/balsa-list


Re: Balsa git master consumes 100% CPU

2020-01-15 Thread Peter Bloomfield

Hi Albrecht:

On 01/14/2020 04:15:51 PM Tue, Albrecht Dreß wrote:

Am 14.01.20 22:03 schrieb(en) Albrecht Dreß:

I updated master to commit 90ee8bcc82d8ebdae0bd286212c21d1138531658, but 
unfortunately the bug is still present:  I can switch between the (six) open 
mailbox tabs (all of them are *not* empty), but nothing is displayed, and one 
CPU is still at 100%.


There seems to be /one/ MBox mailbox (containing various Linux kernel mailing 
list messages) which causes the cpu hog – if it is closed, Balsa starts just 
fine with the other mailboxes, whenever I open it, the CPU goes to 100%, and 
when I close it (the tab for the mailbox), it goes back to normal.

As usual, the mailbox might contain a (more or less) broken message.  But it 
worked with the master rev before last Sunday…  Please let me know if I can 
perform more tests with that mailbox (tomorrow, it's ~2215 now in Germany, and 
I have to work tomorrow 😉️).

Best,
Albrecht.


I just pushed a commit (7a01d8db6) with a fix for another cpu-pegging bug. All 
my problematic mailboxes now load correctly, empty or otherwise. Please check 
it when you get a chance!

Best,

Peter

pgpXUWHsj2KIM.pgp
Description: PGP signature
___
balsa-list mailing list
balsa-list@gnome.org
https://mail.gnome.org/mailman/listinfo/balsa-list


Re: Balsa git master consumes 100% CPU

2020-01-14 Thread Albrecht Dreß

Am 14.01.20 22:03 schrieb(en) Albrecht Dreß:

I updated master to commit 90ee8bcc82d8ebdae0bd286212c21d1138531658, but 
unfortunately the bug is still present:  I can switch between the (six) open 
mailbox tabs (all of them are *not* empty), but nothing is displayed, and one 
CPU is still at 100%.


There seems to be /one/ MBox mailbox (containing various Linux kernel mailing 
list messages) which causes the cpu hog – if it is closed, Balsa starts just 
fine with the other mailboxes, whenever I open it, the CPU goes to 100%, and 
when I close it (the tab for the mailbox), it goes back to normal.

As usual, the mailbox might contain a (more or less) broken message.  But it 
worked with the master rev before last Sunday…  Please let me know if I can 
perform more tests with that mailbox (tomorrow, it's ~2215 now in Germany, and 
I have to work tomorrow 😉️).

Best,
Albrecht.

pgpK5bTr3JimG.pgp
Description: PGP signature
___
balsa-list mailing list
balsa-list@gnome.org
https://mail.gnome.org/mailman/listinfo/balsa-list


Re: Balsa git master consumes 100% CPU

2020-01-14 Thread Albrecht Dreß

Hi Peter!

Thanks a lot for the fast response!

Am 14.01.20 21:21 schrieb(en) Peter Bloomfield:

Apparently an idle handler that was tasked with completing the load of a 
mailbox was being constantly rescheduled. Weirdly, it was only for an empty 
mailbox--loading a mailbox with messages caused no problem!


Hmm, I *don't* have empty mailboxes open…


That part of the code handles scrolling to an appropriate message. An empty 
mailbox doesn't have any message to scroll to on opening, so I just put in some 
code to bypass it; works for me right now without hogging the cpu. Just pushed 
to GitLab.


I updated master to commit 90ee8bcc82d8ebdae0bd286212c21d1138531658, but 
unfortunately the bug is still present:  I can switch between the (six) open 
mailbox tabs (all of them are *not* empty), but nothing is displayed, and one 
CPU is still at 100%.

As I noted above, I don't have empty mailboxes open.  Actually, only outgoing 
and trash are empty, and some remote IMAP mailboxes (which are not connected 
though).  I have a mixture of MBox and Maildir mailboxes – might this make a 
difference?

Thanks,
Albrecht.

pgpgNuFdlTegd.pgp
Description: PGP signature
___
balsa-list mailing list
balsa-list@gnome.org
https://mail.gnome.org/mailman/listinfo/balsa-list


Re: Balsa git master consumes 100% CPU

2020-01-14 Thread Peter Bloomfield

Hi Albrecht!

On 01/14/2020 01:44:00 PM Tue, Albrecht Dreß wrote:

Hi all,

since the latest updates of master I observe that Balsa /sometimes/ after startup 
consumes 100% CPU, and does show nothing in the open mailbox tabs.  I could 
reproduce the issue in gdb (see below); the thread consuming the 100% CPU load is 
the main one (thread 1).  It is still possible to regularly terminate Balsa by 
clicking the main window close button (but File -> Quit does nothing).  I 
*think* this error was introduced last Sunday (Jan. 12, 2020), maybe with commit  
e556a72068b2f9eb4acf0d56cf33f3eaedc0a522?

Any idea what is happening here?

Cheers, Albrecht.


Apparently an idle handler that was tasked with completing the load of a 
mailbox was being constantly rescheduled. Weirdly, it was only for an empty 
mailbox--loading a mailbox with messages caused no problem!

That part of the code handles scrolling to an appropriate message. An empty 
mailbox doesn't have any message to scroll to on opening, so I just put in some 
code to bypass it; works for me right now without hogging the cpu. Just pushed 
to GitLab.

I'm trying to move the time-consuming stuff to threads, to make the UI more 
responsive, and perhaps even make the progress bar move again when setting the 
fraction of a task completed. I also want to look into using a GThreadPool[0], 
to make a limited number of additional threads available for the initial 
opening of mailboxes.

Best,  Peter

[0] https://developer.gnome.org/glib/stable/glib-Thread-Pools.html

pgpRQRUJlGvc4.pgp
Description: PGP signature
___
balsa-list mailing list
balsa-list@gnome.org
https://mail.gnome.org/mailman/listinfo/balsa-list