From: David Moore <dmoore@UCSD.EDU>
Subject: Re: nnmail-split-it
Date: 03 Feb 1997 20:35:15 -0800 [thread overview]
Message-ID: <rvn2tlqjcs.fsf@sdnp5.ucsd.edu> (raw)
In-Reply-To: Lars Magne Ingebrigtsen's message of 04 Feb 1997 02:55:34 +0100
Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:
> Paul Franklin <paul@cs.washington.edu> writes:
>
> > Hmm. I wrote some elisp code to do splitting like this. I didn't
> > distribute it because:
> >
> > * I realized that the bottleneck was disk access time (over NFS).
>
> The box I'm sitting with now is a 486/slow without NFS, and splitting
> is kinda slow here as well.
Two different costs. There is a per message cost (like NFS and
file stating). There is also a per split cost (which is roughly O(n*m)
where n is the number of splits, and m is the number of headers in the
message).
> > It generates a alist of headers, unwrapping lines within headers and
> > separating values from duplicate headers with "\n". You then match
> > with a header or multiple ones concatenated (very useful, for me at
> > least). I never compared them with the default split rules, but I'm
> > fairly sure that this code is tight enough that it's very unlikely to
> > be a bottleneck.
This is similar to what I suggested, but I wasn't going to
bother to put the headers into concatenated strings, since that is quite
slow itself. But tracking the start/end position of those strings makes
doing a buffer regexp search much much faster since it limits the scope
of the search.
As far as why it's a reverse search. Well, I added the \1 sub
ability, and didn't think about the double .* affects with that,
probably because I wasn't using it with 'sender', and I think I used
`\\w' instead of `.'. I recommend that people try [^ :]* or \\w*
instead of .* and see if that helps. I'm not totally sure why Per used
a reverse search in the first place, but I left it because most of the
"uninteresting" headers are at the beginning (received, etc), and it'll
hit the lowest of any multiply matching lines.
--
David Moore <dmoore@ucsd.edu> | Computer Systems Lab __o
UCSD Dept. Computer Science - 0114 | Work: (619) 534-8604 _ \<,_
La Jolla, CA 92093-0114 | Fax: (619) 534-1445 (_)/ (_)
<URL:http://oj.egbt.org/dmoore/> | In a cloud bones of steel.
next prev parent reply other threads:[~1997-02-04 4:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-02-02 22:06 nnmail-split-it Johan Danielsson
1997-02-03 23:28 ` nnmail-split-it David Moore
1997-02-04 1:29 ` nnmail-split-it Paul Franklin
1997-02-04 1:55 ` nnmail-split-it Lars Magne Ingebrigtsen
1997-02-04 4:35 ` David Moore [this message]
1997-02-04 6:16 ` nnmail-split-it anonymous
1997-02-04 8:37 ` nnmail-split-it Per Abrahamsen
1997-02-04 18:05 ` nnmail-split-it David Moore
1997-02-04 19:58 ` nnmail-split-it Lars Magne Ingebrigtsen
1997-02-05 6:44 ` nnmail-split-it Paul Franklin
1997-02-05 8:24 ` nnmail-split-it Per Abrahamsen
1997-02-04 0:46 ` nnmail-split-it Lars Magne Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=rvn2tlqjcs.fsf@sdnp5.ucsd.edu \
--to=dmoore@ucsd.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).