Subject: bug#36714: 27.0.50; Gnus nnmaildir taking long time to recursively visit sub-Maildirs

From: Eric Abrahamsen <[email-masked]>
Date: Mon, 22 Jul 2019 10:21:20 -0700

On 07/22/19 09:34 AM, Basil L. Contovounesios wrote:
> Eric Abrahamsen <[email-masked]> writes:
>
>> 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.
>
> Would it be possible to do custom directory filtering in the
> 'directory-files' virtual server setting of the nnmaildir backend?

I guess it would be possible to set the directory-files setting to a
lambda that accepted the same arguments as `directory-files', and only
returned the desired folder. Again, I just don't know enough about the
inner workings of nnmaildir to say for sure.