[PATCH] VIM: Improve performance of folders_render
[notmuch-archives.git] / 68 / 9e7e098d6db02973cd967cc300c4c703b7eabc
1 Return-Path: <amdragon@mit.edu>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 842CC431FB6\r
6         for <notmuch@notmuchmail.org>; Fri, 27 Jan 2012 14:14:51 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id 4m2Jle9prqmJ for <notmuch@notmuchmail.org>;\r
16         Fri, 27 Jan 2012 14:14:50 -0800 (PST)\r
17 Received: from dmz-mailsec-scanner-6.mit.edu (DMZ-MAILSEC-SCANNER-6.MIT.EDU\r
18         [18.7.68.35])\r
19         by olra.theworths.org (Postfix) with ESMTP id 5ECDA431FAE\r
20         for <notmuch@notmuchmail.org>; Fri, 27 Jan 2012 14:14:50 -0800 (PST)\r
21 X-AuditID: 12074423-b7f9c6d0000008c3-7e-4f2321d815fe\r
22 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
23         by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP\r
24         id 4D.5A.02243.8D1232F4; Fri, 27 Jan 2012 17:14:48 -0500 (EST)\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
26         by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id q0RMEl1w009659; \r
27         Fri, 27 Jan 2012 17:14:48 -0500\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
29         (authenticated bits=0)\r
30         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
31         by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q0RMEkZp014901\r
32         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
33         Fri, 27 Jan 2012 17:14:47 -0500 (EST)\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
35         (envelope-from <amdragon@mit.edu>)\r
36         id 1Rqu3Y-0004Y4-DA; Fri, 27 Jan 2012 17:14:04 -0500\r
37 Date: Fri, 27 Jan 2012 17:14:04 -0500\r
38 From: Austin Clements <amdragon@MIT.EDU>\r
39 To: Tomi Ollila <tomi.ollila@iki.fi>\r
40 Subject: Re: [PATCH 2/2] added support for user-specified directories to\r
41         exclude\r
42 Message-ID: <20120127221404.GB10053@mit.edu>\r
43 References: <8762g0sj6f.fsf@praet.org>\r
44         <1327572718-13411-1-git-send-email-tomi.ollila@iki.fi>\r
45         <1327572718-13411-2-git-send-email-tomi.ollila@iki.fi>\r
46         <87pqe6ip6f.fsf@nikula.org> <m2fwf1jult.fsf@guru.guru-group.fi>\r
47 MIME-Version: 1.0\r
48 Content-Type: text/plain; charset=us-ascii\r
49 Content-Disposition: inline\r
50 In-Reply-To: <m2fwf1jult.fsf@guru.guru-group.fi>\r
51 User-Agent: Mutt/1.5.21 (2010-09-15)\r
52 X-Brightmail-Tracker:\r
53  H4sIAAAAAAAAA+NgFupileLIzCtJLcpLzFFi42IRYrdT0b2hqOxvsPC9tUXTdGeL6zdnMlu8\r
54         WTmP1YHZ4/DXhSwet+6/Zvd4tuoWcwBzFJdNSmpOZllqkb5dAldG06R+1oJnkhW3rys3MK4T\r
55         6WLk5JAQMJG42jmdBcIWk7hwbz1bFyMXh5DAPkaJgyv2MUM4Gxgl/my6yQZSJSRwkkmi55YV\r
56         RGIJo8SkjoNMIAkWAVWJ7rMHwEaxCWhIbNu/nBHEFhFQkXjQtp4VxGYWsJJo2PIBKM7BISwQ\r
57         JPHmEjOIySugI9H4TRhi5B1GiVWnDoOV8woISpyc+YQFolVL4sa/l0wg9cwC0hLL/3GAhDkF\r
58         DCQ65k5nB7FFgTZNObmNbQKj0Cwk3bOQdM9C6F7AyLyKUTYlt0o3NzEzpzg1Wbc4OTEvL7VI\r
59         10wvN7NELzWldBMjOMhdlHcw/jmodIhRgINRiYf3wislfyHWxLLiytxDjJIcTEqivNzAGBHi\r
60         S8pPqcxILM6ILyrNSS0+xCjBwawkwnvHS9FfiDclsbIqtSgfJiXNwaIkzquh9c5PSCA9sSQ1\r
61         OzW1ILUIJivDwaEkwRsKMlSwKDU9tSItM6cEIc3EwQkynAdoeDZIDW9xQWJucWY6RP4Uo6KU\r
62         OG8xSEIAJJFRmgfXC0tCrxjFgV4R5i0AqeIBJjC47ldAg5mABkdcBbm6uCQRISXVwHj9stUL\r
63         u/Vn/y7RPJGXWnVilmJqV4ZL9mEtjh3n7FhVchyXCE0odr0omnl7++X+pKq+s4vl7fnr7x5j\r
64         z10usnOGSXVbCbeDW577elfVO1Y/j58w9zq6RZbN4FmkfIjGVb0b+5Yw2+lVNbklls466crl\r
65         qyjo4i03+fWyg/H1LM6rWP8ukzSZosRSnJFoqMVcVJwIAACyRmwdAwAA\r
66 Cc: notmuch@notmuchmail.org\r
67 X-BeenThere: notmuch@notmuchmail.org\r
68 X-Mailman-Version: 2.1.13\r
69 Precedence: list\r
70 List-Id: "Use and development of the notmuch mail system."\r
71         <notmuch.notmuchmail.org>\r
72 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
73         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
74 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
75 List-Post: <mailto:notmuch@notmuchmail.org>\r
76 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
77 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
78         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
79 X-List-Received-Date: Fri, 27 Jan 2012 22:14:51 -0000\r
80 \r
81 Quoth Tomi Ollila on Jan 27 at 12:41 pm:\r
82 > On Thu, 26 Jan 2012 13:11:36 +0000, Jani Nikula <jani@nikula.org> wrote:\r
83 > > On Thu, 26 Jan 2012 12:11:58 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
84 > > > A new configuration key 'database.exclude' is used to determine\r
85 > > > which directories user wants not to be scanned for new mails.\r
86 > > > \r
87 > > > ---\r
88 > > > \r
89 > > > Notes (from 2011-09-13):\r
90 > > > \r
91 > > > 1) Currently the comments for newly created configuration file are not\r
92 > > > updated, so for not this is 'undocumented feature'. Should there be an\r
93 > > > empty configuration line as a placeholder ... ?\r
94 > > > \r
95 > > > 2) Whenever some already existing directory is added to the exclude list\r
96 > > > and the parent directory timestamp has not changed, notmuch new will not\r
97 > > > notice the directory has gone (as it still is there), user needs to 'touch'\r
98 > > > the parent directory before next 'notmuch new' no make notmuch notice.\r
99 > > > \r
100 > > > 2012-01-26: could notmuch track mtime of the configuration file and if\r
101 > > > that changes, ignore mail directory timestamps ?\r
102 > > > \r
103 > > > 3) count_files() function is not touched. The functionality there has fallen\r
104 > > > behind of add_files_recursive (maildir+tmp check and following symlinks).\r
105 > > > The question there should it be updated, or attempted to merge with\r
106 > > > add_files (as the comment says). count_files() is only called at the beginning\r
107 > > > when database is not yet initialised.\r
108 > > > ---\r
109\r
110 > [ ... ]\r
111\r
112 > > > + /* Ignore user-specified directories */\r
113 > > > + for (j = 0; j < state->database_exclude_length; j++)\r
114 > > > +     if (strcmp(entry->d_name, state->database_exclude[j]) == 0)\r
115 > > > +         break;\r
116 > > > + if (j < state->database_exclude_length)\r
117 > > > +     continue;\r
118 > > \r
119 > > How about wrapping that in a function you can use here and below?\r
120 > > \r
121 > >     if (user_wants_this_excluded (...))\r
122 > >             continue;\r
123\r
124 > Good point....\r
125\r
126 > > Please also have a look at id:"87pqecylon.fsf@nikula.org" and the\r
127 > > patches Austin posted. "Auto ignore"?\r
128\r
129 > I personally don't mind auto ignore -- I even like the system yells about\r
130 > those 3 files I forgot to add to ignore list every now and then (when the\r
131 > mtime of the directory those are located changes). This is also something\r
132 > different -- I can start keeping my drafts and spam directories alongside\r
133 > other mail directories (or folders is you want to use that term).\r
134 \r
135 The allure of auto ignore is that you don't have to do anything to use\r
136 it, but it's much less powerful than explicit ignores.  I think having\r
137 both mechanisms would be overkill and I would use explicit ignores in\r
138 preference to auto ignore.\r
139 \r
140 > Thanks for that id: it refers thread starting from id:"ylp7hi23mw8.fsf@tyndall.ie" \r
141 > ( http://notmuchmail.org/pipermail/notmuch/2010/003145.html )\r
142\r
143 > and the patch there is somewhat more complete (although old rebase-wise). \r
144 > It's easy to combine works together, but more difficult is to choose best \r
145 > terminology: database.exclude vs. new.ignore (or something in between or \r
146 > totally different). Ideas anyone?\r
147 \r
148 I would weigh in on the side of new.ignore, or at least something\r
149 under [new].  This option fits better with the existing option in\r
150 [new] than it does with the existing option in [database].\r