Gnus development mailing list
 help / color / mirror / Atom feed
From: Elias Oltmanns <oltmanns@uni-bonn.de>
Subject: Re: why does message-generate-headers take so long?
Date: Wed, 23 Aug 2006 10:34:42 +0200	[thread overview]
Message-ID: <877j0z97fh.fsf@denkblock.local> (raw)
In-Reply-To: <lsphd04mlzf.fsf@saturna.ca.boeing.com>

Ted Stern <dodecatheon@gmail.com> wrote:
> Hi all,
>
> Sending a message from CVS Emacs + CVS Gnus on Red Hat Enterprise
> Linux Workstation 4 (x86_64) takes quite a bit of time, so I profiled
> all message-* functions to see where the time hog was.
[...]
> Clearly, the most time is being spent in message-generate-headers, and
> the other long times are accumulated with it.  There are a lot of
> (while (re-search-forward)) loops, but this message was just a few
> lines long!

The search functions in cvs emacs that eventually call search_buffer
are really slow if the search string contains an i. This is because
the dotless i is now considered equivalent to the dotted i in
case-insensitive searches. This dotless i is a unicode character which
prevents search_buffer from using the fast boyer moore algorithm (if I
remember the name correctly).

I've raised this issue on emacs-devel quite some time ago but
apparently nobody cared to fix it since. Please see
<http://permalink.gmane.org/gmane.emacs.devel/53901>
for further information.

My temporary workaround is the following snippet in ~/.emacs:

--8<---------------cut here---------------start------------->8---
(unless (< emacs-major-version 22)
  (set-case-syntax 331856 "w" (standard-case-table))
  (set-case-syntax 331857 "w" (standard-case-table)))
--8<---------------cut here---------------end--------------->8---

Hope that helps.

Elias




      parent reply	other threads:[~2006-08-23  8:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-22 22:41 Ted Stern
2006-08-23  4:24 ` Andreas Seltenreich
2006-08-23  8:43   ` Simon Josefsson
2006-08-23 13:47     ` Wes Hardaker
2006-08-23 15:15       ` Simon Josefsson
2006-08-23 15:34         ` gdt
2006-08-23  8:34 ` Elias Oltmanns [this message]

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=877j0z97fh.fsf@denkblock.local \
    --to=oltmanns@uni-bonn.de \
    /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).