From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#36714: 27.0.50; Gnus nnmaildir taking long time to recursively visit sub-Maildirs Date: Thu, 18 Jul 2019 17:27:18 -0700 Message-ID: <87v9vyrhqx.fsf@ericabrahamsen.net> References: <86ftn37cvz.fsf@protected.rcdrun.com> <87sgr32mnq.fsf@ericabrahamsen.net> <20190718194311.GA6908@protected.rcdrun.com> <87k1cf2jqh.fsf@ericabrahamsen.net> <20190718204841.GB6908@protected.rcdrun.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="202529"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 36714@debbugs.gnu.org To: Jean Louis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 19 02:28:09 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hoGkr-000qSZ-Ij for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Jul 2019 02:28:09 +0200 Original-Received: from localhost ([::1]:41622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hoGkq-0003ma-Az for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Jul 2019 20:28:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35934) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hoGkm-0003aA-7B for bug-gnu-emacs@gnu.org; Thu, 18 Jul 2019 20:28:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hoGkl-0006Id-0Y for bug-gnu-emacs@gnu.org; Thu, 18 Jul 2019 20:28:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46088) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hoGkj-0006Hn-Qw for bug-gnu-emacs@gnu.org; Thu, 18 Jul 2019 20:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hoGkj-0007uX-Ly for bug-gnu-emacs@gnu.org; Thu, 18 Jul 2019 20:28:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <86ftn37cvz.fsf@protected.rcdrun.com> Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Jul 2019 00:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36714 X-GNU-PR-Package: emacs Original-Received: via spool by 36714-submit@debbugs.gnu.org id=B36714.156349605330363 (code B ref 36714); Fri, 19 Jul 2019 00:28:01 +0000 Original-Received: (at 36714) by debbugs.gnu.org; 19 Jul 2019 00:27:33 +0000 Original-Received: from localhost ([127.0.0.1]:54909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hoGkG-0007te-Or for submit@debbugs.gnu.org; Thu, 18 Jul 2019 20:27:33 -0400 Original-Received: from ericabrahamsen.net ([52.70.2.18]:33532 helo=mail.ericabrahamsen.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hoGkB-0007tJ-Pe for 36714@debbugs.gnu.org; Thu, 18 Jul 2019 20:27:31 -0400 Original-Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 92AC7FA0E6; Fri, 19 Jul 2019 00:27:20 +0000 (UTC) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:163356 Archived-At: On 07/18/19 22:48 PM, Jean Louis wrote: > * Eric Abrahamsen [2019-07-18 22:04]: >> I'm assuming your value of `gnus-check-new-newsgroups' is at its default >> of 'ask-server. Try setting it to nil. That will (should) at least >> prevent Gnus from scanning all the folders at startup. It doesn't solve >> the underlying problem, but in your case it >> might avoid it. > > Thank you. > > I did try to set it to nil, it is set. However, > "Checking new news" is seen and Gnus is working > with hard disk. > > So it does not prevent it to scan Maildirs. I guess that's not too surprising. If Gnus has never actually been able to get off the ground, it's probably doing an initial scan of some sort. > gnus-select-method is a variable defined in =E2=80=98gnus.el=E2=80=99. > Its value is (nnmaildir "" (directory "~/Maildir")) > >> The final setup you want is to be subscribed to the main folder, but >> unsubscribed from the sub maildirs. The question is, can you get to the >> point where you can do that without first having Gnus spend hours >> scanning a million directories. Try the above fix and see if Gnus will >> show you all the other (unwanted) directories. > > It does not work. > >> We're talking about two different things here. One is defining each of >> the maildirs as a separate server. So: >> >> '(gnus-secondary-select-methods >> '( >> (nnmaildir email1 >> (directory /home/data1/protected/Maildir/email1@example.com/)) >> (nnmaildir email2 >> (directory /home/data1/protected/Maildir/email2@example.com/)) >> (nnmaildir email3 >> (directory /home/data1/protected/Maildir/email3@example.com/)))) >> >> Etc. >> >> The other thing you want -- quick switching to a particular group -- can >> certainly be done, but will require a little bit of elisp. Something >> like (totally untested): >> >> (let* (( email "ss@rcdrrun.com") >> (account (car-safe (split-string email @)))) >> (when account >> (gnus-group-read-group >> nil t (concat nnmaildir+ account :INBOX)))) > > I will try that, but I cannot get it without > starting to run or index whatever. > > I was thinking that gnus-secondary-select-methods > has to be set before I start reading the folder, > and that above looks that you think that way. Yes, you should try setting your secondary select methods to one-per-account before you try any of the rest of this. > I have tried this > > (let* ((email "person@example.com") > (gnus-secondary-select-methods '((nnmaildir email (directory (concat "~/= Maildir/" email)))))) > (gnus-group-read-group nil t (concat "nnmaildir+" email :INBOX))) > > > but I am getting this below and I used real email > address. Do I need to assign the group somehow? First of all, this isn't going to work until you've got Gnus into a basic functioning state -- ie, it's already done a successful scan of your nnmaildir backends. I would leave this part aside until you've got Gnus working normally. (Also you can't reference a variable inside a quoted form without using backquoting and unquoting, and let-binding `gnus-secondary-select-methods' is asking for trouble, and :INBOX needs to be a string, but really don't bother messing with this at all until Gnus is functioning.) Second of all... unfortunately I don't know this code well enough to figure it out without sitting down with a chunk of time. So far as I can tell, nnmaildir scans the maildir directories using `directory-files', which by itself is very quick. Presumably what's slow is registering all the messages inside the directories, and I don't immediately see a way of preventing that. A dirty hack you might try is: temporarily remove the other directories from one of the maildir accounts, let Gnus index that, and then (while making sure that `gnus-check-new-newsgroups' is nil) move the other directories back in. It's possible that Gnus will ignore them, but I'm really not sure -- I would check with just one of your four accounts first. Until I or someone else has time to dig deeper, that's the best I can suggest, sorry... Eric