[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] m_getfld
From: |
Jon Steinhart |
Subject: |
Re: [Nmh-workers] m_getfld |
Date: |
Mon, 10 Dec 2012 20:54:27 -0800 |
Paul Vixie writes:
> On 2012-12-11 4:32 AM, Ken Hornstein wrote:
>
> > Also ... maybe I'm just showing my age, but I always felt that mmap()
> > should be reserved for special-purpose uses, and this ain't one of them
> > (IMHO).
>
> there's no way to avoid string copy overhead if you use read(), unless
> you're on a rare kernel that will see a page aligned page sized buffer
> passed to it and do page flipping from the buffer cache. i love the fact
> that freebsd "cp" uses mmap when it can. looks like "ar", "cmp", and
> "tail" also do this. fun!
>
> but m_getfld isn't reading mail bodies, just headers. they fit in one
> page on almost all modern machines and all mail messages. i'd say
> there's no advantage to mmap if it's only saving us a 4K string copy
> from kernel to user mode. stdio doesn't prefetch all that much.
>
> paul
First of all, I'm pleased that at least folks are talking about getting
rid of m_getfld. I like Paul's idea of just writing something new and
migrating over to it.
I would like to see a separation between parsing mail messages and reading
profiles and such. Seems like the old code is really doing two completely
unrelated things, maybe to save a few bytes in the old days.
I don't quite agree with Paul on the "just headers" part of things. I would
like any m_getfld replacement to have the ability to extract information
about MIME message parts which means finding headers in the middle of bodies.
As per postings some years ago, I would like to add code for reading attachments
that needs this feature. Unfortunately I don't have time to do much more than
lurk at the moment.
Jon
- Re: [Nmh-workers] m_getfld, (continued)
- Re: [Nmh-workers] m_getfld, David Levine, 2012/12/09
- Re: [Nmh-workers] m_getfld, David Levine, 2012/12/09
- Re: [Nmh-workers] m_getfld, David Levine, 2012/12/09
- Re: [Nmh-workers] m_getfld, David Levine, 2012/12/09
- Re: [Nmh-workers] m_getfld, David Levine, 2012/12/10
- Re: [Nmh-workers] m_getfld, Lyndon Nerenberg, 2012/12/10
- Re: [Nmh-workers] m_getfld, Ken Hornstein, 2012/12/10
- Re: [Nmh-workers] m_getfld, Paul Vixie, 2012/12/10
- Re: [Nmh-workers] m_getfld,
Jon Steinhart <=
- Re: [Nmh-workers] m_getfld, Ken Hornstein, 2012/12/10
- Re: [Nmh-workers] m_getfld, Valdis . Kletnieks, 2012/12/14
- Re: [Nmh-workers] m_getfld, Paul Vixie, 2012/12/14
- Re: [Nmh-workers] m_getfld, Paul Vixie, 2012/12/10
- Re: [Nmh-workers] m_getfld, Ken Hornstein, 2012/12/10
Re: [Nmh-workers] m_getfld, Ralph Corderoy, 2012/12/11