<<< Date Index >>>     <<< Thread Index >>>

Re: user processing delays with IMAP folders



On 04Apr2006 23:26, phil pennock <mutt-dev@xxxxxxxxxxxxxxxxx> wrote:
| As a heads-up before the next release: earlier today I finally tracked
| down why mutt appears to "hang" and not respond sometimes at when at
| work.
| 
| I'm subscribed to 127 folders, many of which rarely get new mail.  Mutt
| fills up the IMAP command queue and hangs waiting for it to flush; it
| then supplies more IMAP commands without stopping to deal with user
| interaction or changing the folder.
| 
| As a result, I can end up waiting quite a while whilst mutt "hangs".
| 
| Behaviour cause confirmed with watching ~/.muttdebug0 grow; work-around
| is: set mail_check=32767
| 
| I had previously tried raising IMAP_PIPELINE_DEPTH, but only to 50 and
| it didn't help; having seen the actual behaviour, I'm dubious that
| raising it to 150 would help, since it looks as though mutt just hangs
| waiting for the response.  However, it might be that it's only hanging
| because it's trying to queue commands.  Can anyone confirm that this
| might be true and that it's worth trying to lengthen the pipeline that
| far?

Another idea, possibly better if feasible (I don't like just upping
queues until "full queue" is merely unlikely):

Clearly mutt knows when it has filled the queue.  When this happens,
place a token somewhere (in the queue, in a flag in the processing
loop, whatever) to go look for interaction before trying to run any
more queuing.

Disclaimer: I have not read mutt's code for this; it may not be suited
to such a scheme. But the basic idea runs: which CPU-bound, kick off
work intil I/O bound. Then check keyboard interaction and flush screen
updates before blocking. If mutt does non-blocking keyboard polls it
may be feasible to process keyboard input until none, then return to
work, or monitor both the IMAP results flow and the keyboard at once or
alternately when waiting for both.
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

This explains a lot about me. I thought it was the heavy drinking, the
late hours, the barking mad women, the lying around in bed reading novels and
eating Nescafe out of a jar with the spoon. But it's because of the Mac.
        - Tony Cunningham, <tjc@xxxxxxxx>