nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] m_getfld branch merged

2013-01-29 12:13:35
Done with a very minor code addition.  I also reduced
m_getfld's internal buffer size from 8K to 4K.  That seems
to be a better match for message header size these days, and
4K is also the stdio buffer size on Linux.

With those changes, scan(1) performance is identical to what
it was before the merge.

Awesome, thanks David!

Did you notice the number of calls to open(2) for a MIME
message?  One per part, plus the seek to the start of the
part.  parse_mime() needs tilling.  Most the mh* programs
rely on it.

Ahhhh ..... crud.  I hadn't yet ventured into there.  It sounds like
I'm going to have a Paul-Vixie-reads-m_getfld()-for-the-first-time
style moment :-/

It's certainly possible to parse MIME messages in a single pass; I learned
that when writing replyfilter.  Sigh, something else to work on.

Norm Shapiro writes:
Is it really worth expending such high octane talent, to make nmh faster
?

Can't speak for anyone else, but I don't consider myself 100LL ... I'm
probably closer to 89 (R+M)/2, on a good day.

David was the one who rolled up his sleeves and did the hard work on
this one, but let me speak to the larger issues here.

It's hard when dealing with open-source projects that we work on in
our Copious Spare Time(tm) to balance the many priorities we have to
face.  We have to solve immediate problems that make nmh not work for
us, but also keep an eye on the longer-term issues.  Also, since we're
(presumably) not getting paid to work on nmh, there is the issue of
motivation.

Adding features to nmh is relatively easy to justify in terms of making
it work better, which makes nmh more pleasant to use.  E.g., my work
on replyfilter was to solve a problem which was causing me a lot of
grief.  Everything is smoother for me now with it, so that's an obvious
win.

Working on things like m_getfld() is harder.  In a perfect world, no one
would notice any changes at all, and think about the perversity here ...
you do a whole lot of work, and if you do your job perfectly, nobody
notices a thing!  And it IS a lot of work; just check out the m_getfld
branch, and that's not even counting the time you spend staring at
the source code figuring out what is going on there.

So how do you get motivation to work on back-end things in nmh?  Well,
pride in your work is one option.  Redoing m_getfld() and making a small
change so you don't have any performance loss ... that's something to
be proud about.

I guess my larger point is that it's not always obvious to other people how
we allocate our personal time; there are a lot of factors in play.  But
I personally feel as long as we're improving nmh, nothing is wasted.

--Ken

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>