Re: html-widget choice and use of html2text

Jack via balsa-list <[email protected]>
Newsgroups gmane.comp.gnome.apps.balsa
Message-ID <[email protected]>
On 2018.11.23 16:20, Albrecht Dreß wrote:
> Hi Jack:
> 
> Am 23.11.18 21:24 schrieb(en) Jack via balsa-list:
>> I took a new tack tracking down my problem with balsa becoming  
>> unresponsive when downloading some new messages, and discovered  
>> (just using top) that when balsa seems frozen, one CPU was pegged  
>> running html2text.  As that seems only necessary when using  
>> gtk-webkt2 on html-only messages, I tried recompiling with  
>> gtkthtml.   As that didn't work, I vaguely recall the discussion  
>> deciding to drop it.
> Yes, gtkhtml is deprecated & probably full of security issues…
> 
>>  However, it's mention has not yet been removed from README.
> Oooops…
> 
>> I have not yet delved into the code - but I'm wondering if my  
>> problem is because of how Balsa calls html2text - possibly in some  
>> way which prevents any interruptions.  Also, I'd like to confirm  
>> that html2text is only called on html-only messages.  Related  
>> question - why is html2text called at all when fetching messages  
>> (POP3) from the server.
> Good question.  It is used in html.c, function html2text(), which in  
> turn is called from libbalsa_html_to_string(), which in turn is  
> /only/ called from mime.c, process_mime_part().
I suppose the question then is whether this is ever called on an html  
part of a message which DOES have a plain text part.  Also, why this is  
called at any time other than needing to extract the text for reply or  
forward.
> 
>> I would expect it is only needed when forwarding or replying.  Am I  
>> missing something.  Separately - I'll have to check the relative  
>> performance of the other viable html2text solutions.
> html2text is rather old and the “last resort” option.  Could you try  
> to install python3's html2 markdown (on Debian package  
> python3-html2text), and try if this works better?  And you could try  
> to just kill the apparently hanging html2text process and see if  
> Balsa stops hanging.
I do plan to try all the others.  Note however, that with the recent  
exception of two emails from Staples, the html2text wasn't hanging,  
just taking a long time, and causing (?) Balsa to be unresponsive.   
Killing html2text just relaunched it (not sure if it was with the same  
message or on a different one, however).

Te reiterate the symptoms - at some times when downloading POP3  
messages, Balsa seems to hang.  I can move the main window, but it does  
not redraw until some trigger, but I don't know for sure what that  
trigger is.  While "frozen" no clicking on anything (buttons,  
mailboxes, messages in the list) have any effect until that freeing  
trigger.  The "downloading mail" window can't even be moved, although  
if I click and wait, sometimes I can move it after some time, but still  
before the trigger event.  While running top or KDEs ksysguard, the  
freeing event is not simply html2text finishing and another one  
launching.  That's why I'm still not sure if the fact that html2text is  
hogging a complete CPU is the problem, some indication of the problem,  
or just a red herring.

Plenty more research for me to do.
> 
> Cheers,
> Albrecht.
Jack
_______________________________________________
balsa-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/balsa-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.