[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Slowdown with a Populated Folder.

From: Ken Hornstein
Subject: Re: [Nmh-workers] Slowdown with a Populated Folder.
Date: Wed, 01 Jan 2014 13:06:57 -0500

>Yes, that's handy, thanks.

You know, I was thinking ... there were, what, approx 7000 files in that
directory?  I'm surprised getdirentries() was the bottleneck there;
I would have thought that after the first run, the directory pages
would be in the cache.  Does plain old ls(1) take the same amount of
time there?  It could be that we could be doing something better in
folder_read(), but I'm unclear from reading the readdir() manpage as to
what it would be.  If it really is readdir() ... well, that seems kinda
lousy, but not much we can do about it.  But if part of the problem is
us, it would be nice to figure out what we're doing wrong.

>~/bin/mhseqrm altered to use it.
>http://git.savannah.gnu.org/cgit/nmh.git/tree/man/mark.man#n95 covers
>the case where a sequence exists;  perhaps this could be added there.

I'll look at it, although from what I remember I kind of deduced it would
work from the man page.

>Looking at some of the others uses of ~/bin/mhseqexists, I find
>    mhseqexists lp && mark -seq lpsave -zero -add lp
>    # ...
>    if mhseqexists lpsave; then
>        mark -seq lp -zero -add lpsave
>        mhseqrm lpsave
>    fi
>It would be nice if that could be
>    mark -newswitch -seq lpsave -zero -add lp
>    # ...
>    mark -newswitch -seq lp -zero -add lpsave
>where an unknown sequence being added is treated as empty.  We already
>have, as you've shown, the ability to "create" an empty sequence that
>doesn't get saved.

Hm.  I think that MIGHT be a challenge.  Right now all of that happens
in m_convert(), which doesn't distinguish between an invalid sequence
and a message range that doesn't exist.  Also, m_convert() includes the
bad habit of a bunch of MH APIs in that it prints out errors to stderr
directly.  So I'm not sure how we can make that happen, unless we do some
higher-level sequence interpretation at the mark(1) level.  That would
be hairy.  We could add a new argument to m_convert() to allow unknown
sequences() to be empty; that change would probably be merely tedious,
as it would require changes for all callers of m_convert().

Looking at m_convert() ... it might be a bit tricky and need some changes
to m_conv().  I think this has reached the level of "I personally don't
care enough to fix it, but someone else is welcome to do it".


reply via email to

[Prev in Thread] Current Thread [Next in Thread]