From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/9782 Path: main.gmane.org!not-for-mail From: Paul Franklin Newsgroups: gmane.emacs.gnus.general Subject: Re: nnmail-split-it Date: 03 Feb 1997 17:29:24 -0800 Organization: Computer Science, U of Washington, Seattle, WA, USA Sender: paul@snowking.cs.washington.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035149752 20506 80.91.224.250 (20 Oct 2002 21:35:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:35:52 +0000 (UTC) Return-Path: Original-Received: from ifi.uio.no (0@ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.8.5/8.8.5) with SMTP id RAA11159 for ; Mon, 3 Feb 1997 17:43:43 -0800 Original-Received: from sunsite.auc.dk (qmailr@sunsite.auc.dk [130.225.51.30]) by ifi.uio.no with SMTP (8.6.11/ifi2.4) id for ; Tue, 4 Feb 1997 02:29:31 +0100 Original-Received: (qmail 21848 invoked by uid 509); 4 Feb 1997 01:29:29 -0000 Original-To: ding@ifi.uio.no Original-Newsgroups: emacs.ding Original-Lines: 25 X-Newsreader: Red Gnus v0.82/Emacs 19.34 Original-Path: snowking.cs.washington.edu Original-NNTP-Posting-Host: snowking.cs.washington.edu Xref: main.gmane.org gmane.emacs.gnus.general:9782 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:9782 >>>>> David Moore writes: > And a much better fix would be to preparse the message headers, > to allow much faster comparisons, as it's really slow currently with > lots of split rules. 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). * I heard that elisp operations on buffers tend to be faster than operations on strings. (Tracking start/end points would help this, but either make it less useful to me or more complex.) 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. If you're interested in the code, drop me a line. --Paul