unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* New buffer-case-table makes search_buffer painfully slow
@ 2006-05-04 13:46 Elias Oltmanns
  2006-05-06 19:10 ` Elias Oltmanns
  0 siblings, 1 reply; 6+ messages in thread
From: Elias Oltmanns @ 2006-05-04 13:46 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-05-13  4:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-04 13:46 New buffer-case-table makes search_buffer painfully slow Elias Oltmanns
2006-05-06 19:10 ` 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

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).