procmail
[Top] [All Lists]

Re: Scanning IMAP mail (first solution)

2009-11-17 19:40:29
On Tue, 2009-11-17 at 18:28 -0600, JW Simpson wrote:
On Tue, 2009-11-17 at 16:47 -0700, LuKreme wrote:
On 17-Nov-2009, at 16:35, JW Simpson wrote:
CUR_LIST=`/usr/bin/find Maildir/ -regex '.*/cur/.*,'|/usr/bin/gawk -F/ 
'{print $2}'`


This is very very slow though.
Good catch ... I have a tendency to assume that I'm right in the first
place, and not consider other approaches once I've got one that works.

It's nice to be able to get feedback like that.

Right ... So that's an easy replacement of just one line.  Once you
switch that out is there a significant difference in speed?

My concern is that the "scoring" might be more expensive than using the
external script?


 $ time /usr/bin/find Maildir/ -regex '.*/cur/.*,'|/usr/bin/awk -F/ '{print 
$2}'
[…]

real        0m19.055s
user        0m15.869s
sys 0m0.183s

$ time for i in `ls -A $HOME/Maildir/ | grep '[0-9]-*'`;  do ls -1 
$HOME/Maildir/$i/{cur,new}/*, 2>/dev/null ; done

[…]

real        0m0.652s
user        0m0.120s
sys 0m0.497s


-- 
JW Simpson <john(_at_)swajime(_dot_)com>
SwaJime's Cove℠

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail