On Wed, 22 Jul 2009, Christian Ebert wrote:

> * Adam Wellings on Tuesday, July 21, 2009 at 20:28:39 +0100
> > On Tue, 21 Jul 2009, Christian Ebert wrote:
> >> Well, your nodes clobber the mailboxes list, don't they.
> > 
> > Not that I can see.
> 
> Do <toggle-mailboxes> (bound to <tab> by default) in the browser.
> This lists your configured mailboxes, and the nodes shouldn't be
> in there, imho.
> 

If I get a few minutes I'll put that back and have a look-see. I may even run 
it for a day and see if there's any noticeable behavioural problems.

> > Anyway, I went back to my previous one with the addition
> > of -prune. It's ~0.5s instead of the ~0.3s that that one came up with. I
> > can live
> 
> Oh, right, good idea (I don't understand this -prune stuff
> really, to be honest).

-prune stops the find from descending into the directory. So, without it, if 
it finds a directory 'cur', it will go into it and look for more 
subdirectories called 'cur'. As we can (reasonably) assume that there are 
none, by putting -prune it doesn't do that. "prune" is a little convoluted 
(prune the tree at this point, is what I assume it means) as an option name, 
but I can't think of a better one.

> 
> This works also for find w/o -printf:
> 
> find ~/Mail -type d -name cur -prune -execdir pwd \;
> 
> Another idea:
> 
> find ~/Mail -type d \( -name cur -o -name new -o -name tmp \) -prune -execdir 
> pwd \; | uniq
> 

Ah that's worth a try. I did wonder if checking for one of all three sub-dirs 
would be quicker. Anyway that's back down to ~0.3s. Nice one.

It occurred to me last night, that I could use a combination of the fixed 
index, and dynamic set. My folder set is generally static except for list 
folderss - which get automatically created by Procmail and long-term working 
folders (some jobs take six months, and I don't want the emails from them 
lying around the inbox) which can be created by one of a number of processes.

However as the list maildirs are below a "lists" folder and the working ones 
below a "working" folder, I could use a stable index of the rest, and just 
search below those two folders, where the depth will also just be one. The 
index file could also be added to by procmail and the other processes, maybe 
-though it will create a larger maintenance effort.

As this is probably more effort to set-up than the saving will be (at least 
at the moment), I'll probably set it up when I switch to my new desktop 
machine.

cheers,
Adam

-- 
"...one cannot be angry when one looks at a penguin."
                                        - John Ruskin

Reply via email to