From owner-freebsd-ports@FreeBSD.ORG Fri Sep 15 15:09:16 2006 Return-Path: X-Original-To: ports@FreeBSD.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C54B516A415; Fri, 15 Sep 2006 15:09:16 +0000 (UTC) (envelope-from vd@datamax.bg) Received: from jengal.datamax.bg (jengal.datamax.bg [82.103.104.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4D0743D7B; Fri, 15 Sep 2006 15:09:08 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from qlovarnika.bg.datamax (qlovarnika.bg.datamax [192.168.10.2]) by jengal.datamax.bg (Postfix) with SMTP id 1BFF0B833; Fri, 15 Sep 2006 18:09:07 +0300 (EEST) Received: (nullmailer pid 20384 invoked by uid 1002); Fri, 15 Sep 2006 15:09:07 -0000 Date: Fri, 15 Sep 2006 18:09:07 +0300 From: Vasil Dimov To: Udo Schweigert Message-ID: <20060915150906.GA9451@qlovarnika.bg.datamax> References: <20060807090557.GA66271@qlovarnika.bg.datamax> <20060808154716.GA48905@alaska.cert.siemens.com> <20060809095923.GA41809@qlovarnika.bg.datamax> <20060809104953.GA42558@qlovarnika.bg.datamax> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060809104953.GA42558@qlovarnika.bg.datamax> Cc: ports@FreeBSD.org, me@mutt.org Subject: Re: mail/mutt-devel: regression in 1.5.12 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vd@FreeBSD.org List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Sep 2006 15:09:16 -0000 On Wed, Aug 09, 2006 at 01:49:53PM +0300, Vasil Dimov wrote: > > Since I upgraded mutt-devel from 1.5.11 to 1.5.12 moving through the > messages became hell slow. > > I use IMAP and when I open a folder and hold down ``j'' or down-arrow > the hilighted line starts to move downside very slow (just as if the > keyboard repeat rate is set up low). When it reaches 5th message I > release the ``j'' key and it goes by itself up to the 18th message. > I find this really annoying and it renders mutt almost unusable for me :/ > I just installed 1.5.11 again and the hilighted line flies like an arrow > and stops as soon as I release ``j'', so the problem is definedly > between 1.5.11 and 1.5.12. [...] > > I think I got close to the problem. > > It is not exactly if the protocol is imap:// or imaps:// > but rather how many mailboxes with the same prefix > (imap://vd:__secret__@pop/) I have. E.g. the more folders I have the > worst it gets. > > Firstly some more deatils on my setup: > > I have 14 folders listed in my muttrc: > mailboxes imaps://vd:__secret__@pop/ > mailboxes imaps://vd:__secret__@pop/freebsd-ports > mailboxes imaps://vd:__secret__@pop/freebsd-hackers > mailboxes imaps://vd:__secret__@pop/freebsd-amd64 > mailboxes imaps://vd:__secret__@pop/freebsd-ports-bugs > mailboxes imaps://vd:__secret__@pop/spam > ... > > In my testing I changed just one of them to > mailboxes imap://vd:__secret__@pop/freebsd-ports-bugs > and then moving through the messages in there was fine. > When I changed all of them to imap:// the problem reappeared. > > Next I disabled SSL support on the server (so TLS is not negotiated > via the plaintext imap://) and tested with all 14 folders set to imap:// > The result was that the problem existed but things were just a little > bit better. > [...] Today I did some digging and came out with a patch: --- patch-curs_main.c__speed.diff begins here --- --- curs_main.c.orig Thu Jun 8 14:50:29 2006 +++ curs_main.c Fri Sep 15 17:45:18 2006 @@ -523,7 +523,18 @@ imap_disallow_reopen (Context); #endif - if (!attach_msg) + if (!attach_msg +#ifdef USE_IMAP + /* In some circumstances (SSL with 10+ IMAP mailboxes) checking + * for new mail (more precisely - imap_buffy_check()) on every + * keystroke is *very* slow, so skip this check for the two most + * common move-up and move-down keystrokes. + * Read this whole thread: + * http://lists.FreeBSD.org/pipermail/freebsd-ports/2006-August/034559.html + */ + && op != OP_MAIN_NEXT_UNDELETED && op != OP_MAIN_PREV_UNDELETED +#endif + ) { /* check for new mail in the incoming folders */ oldcount = newcount; --- patch-curs_main.c__speed.diff ends here --- This is generally "do not call the slow function whem moving through the messages with j and k keys". Obviously this kills some functionality. The thing I didn't figure out is "why 1.5.11 does not suffer from the problem and works just fine?". -- Vasil Dimov gro.DSBeerF@dv Testing can show the presence of bugs, but not their absence. -- Edsger W. Dijkstra