From: Elias Oltmanns <oltmanns@uni-bonn.de>
Subject: New buffer-case-table makes search_buffer painfully slow
Date: Thu, 04 May 2006 15:46:05 +0200 [thread overview]
Message-ID: <87y7xhq4wy.fsf@denkblock.local> (raw)
Hi all,
switching from emacs 21 to emacs 22 has a very significant performance
impact on packages that make heavy use of search_buffer. An example
that actually made me aware of this problem is gnus processing large
mbox files. Further analysis of this problem revealed that in emacs 22
an "i" in the search string makes search_buffer use simple_search()
instead of boyer_moore(). This means that, for instance, a loop
repeatedly calling re-search-forward with the search string
"X-Gnus-Article-Number" takes (in the order of several magnitudes)
more time in emacs 22 than in emacs 21 just because of the "i" in
article -- at least in a multibyte buffer. The cause for this seems to
be a change in the buffer-case-table. Comparing the output of M-x
describe-buffer-case-table in emacs 21 resp. emacs 22 makes me wonder
whether a match of a certain character in unicode row 32 with "i" in
the emacs 22 table might be the cause for this trouble. If so, what
would be the right thing to do about it? Of course, applications like
gnus have to open the mbox files in multibyte mode simply because
mails in different languages and charsets may be stored in these
files. Yet, I'm quite confident that quite a few people if not the
majority will never need the match of i with this obscure character
but would certainly prefer the boyer_moore algorithm when searching
for strings containing an "i".
Any ideas and thoughts concerning this problem?
Regards,
Elias
next reply other threads:[~2006-05-04 13:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-04 13:46 Elias Oltmanns [this message]
2006-05-06 19:10 ` New buffer-case-table makes search_buffer painfully slow Elias Oltmanns
2006-05-06 20:17 ` Andreas Schwab
2006-05-07 5:01 ` Richard Stallman
2006-05-12 14:16 ` Elias Oltmanns
2006-05-13 4:53 ` Richard Stallman
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y7xhq4wy.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).