From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/63933 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.pretest.bugs,gmane.emacs.gnus.general Subject: Re: Slow operations on buffers of tens of megabytes Date: Tue, 07 Nov 2006 15:13:10 +0100 Message-ID: References: Reply-To: Reiner Steib NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1162908836 32084 80.91.229.2 (7 Nov 2006 14:13:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 7 Nov 2006 14:13:56 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, Elias Oltmanns , ding@gnus.org Original-X-From: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Tue Nov 07 15:13:51 2006 Return-path: Envelope-to: gebp-emacs-pretest-bug@gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GhRhm-0000KX-CY for gebp-emacs-pretest-bug@gmane.org; Tue, 07 Nov 2006 15:13:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GhRhl-0008C6-ID for gebp-emacs-pretest-bug@gmane.org; Tue, 07 Nov 2006 09:13:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GhRhf-0008AR-Iu for emacs-pretest-bug@gnu.org; Tue, 07 Nov 2006 09:13:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GhRhd-00087F-UT for emacs-pretest-bug@gnu.org; Tue, 07 Nov 2006 09:13:26 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GhRhd-000876-LX for emacs-pretest-bug@gnu.org; Tue, 07 Nov 2006 09:13:25 -0500 Original-Received: from [134.60.1.1] (helo=mail.uni-ulm.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GhRhc-0003Iu-Pr for emacs-pretest-bug@gnu.org; Tue, 07 Nov 2006 09:13:25 -0500 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.10.123]) by mail.uni-ulm.de (8.13.8/8.13.8) with ESMTP id kA7EDBXl014431; Tue, 7 Nov 2006 15:13:15 +0100 (MET) Original-Received: by bridgekeeper.physik.uni-ulm.de (Postfix, from userid 170) id 159F61231C; Tue, 7 Nov 2006 15:13:11 +0100 (CET) Original-To: Alexandre Oliva X-Face: P05mdcZT&lL[-s2=mw~RsllZ0zZAb?vdE}.s, Elias Oltmanns , emacs-pretest-bug@gnu.org, ding@gnus.org User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.90 (gnu/linux) X-DCC-EATSERVER-Metrics: gemini 1166; Body=4 Fuz1=4 Fuz2=4 X-BeenThere: emacs-pretest-bug@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for CVS Emacs." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Errors-To: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.pretest.bugs:14950 gmane.emacs.gnus.general:63933 Archived-At: [ Cc-ing Elias Oltmanns; See or for the full thread. ] On Mon, Nov 06 2006, Alexandre Oliva wrote: > On Nov 6, 2006, Reiner Steib wrote: > >> My guess is that it's problem with case-fold-search when searching for >> "X-Gnus-Article-Number" in mbox files in Emacs 22 as analyzed by Elias >> Oltmanns back in June: > > Yep, that's it! > >> | --- ~/.emacs --- >> | (unless (< emacs-major-version 22) >> | (set-case-syntax 331856 "w" (standard-case-table)) >> | (set-case-syntax 331857 "w" (standard-case-table))) >> | --- ~/.emacs --- > > This makes gnus blazingly fast again. > >> | We could also add a minor mode to set up the case table all the way >> | for Turkish. >> | >> | Would someone like to do that? > > I can try to take a stab at it, but not being an Emacs hacker I just > barely understand the relationship between the reported bug and the > ultimate cause reported in the e-mail, nevermind the proposed work > around, that is indistinguishable from magic to me ;-) > > I guess this means I may need some hand-holding, and at this point I'm > not sure that would be more work than actually making the changes. > Please advise. If the problem can't be solved in Emacs, we could maybe change `nnheader-find-file-noselect' to change the case table for the mbox files. The current code reads: --8<---------------cut here---------------start------------->8--- (defun nnheader-find-file-noselect (&rest args) "Open a file with some variables bound. See `find-file-noselect' for the arguments." (let* ((format-alist nil) (auto-mode-alist (mm-auto-mode-alist)) (default-major-mode 'fundamental-mode) (enable-local-variables nil) (after-insert-file-functions nil) (enable-local-eval nil) (coding-system-for-read nnheader-file-coding-system) (version-control 'never) (ffh (if (boundp 'find-file-hook) 'find-file-hook 'find-file-hooks)) (val (symbol-value ffh))) (set ffh nil) (unwind-protect (apply 'find-file-noselect args) (set ffh val)))) --8<---------------cut here---------------end--------------->8--- I expect that (apply 'find-file-noselect args) could be changed to: --8<---------------cut here---------------start------------->8--- (with-current-buffer (apply 'find-file-noselect args) (unless (or (featurep 'xemacs) ;; Better check? (< emacs-major-version 22)) ;; Apply ASCII-only case-table. Don't modify the ;; standard-case-table. (SOME-CASE-TABLE-CODE))) --8<---------------cut here---------------end--------------->8--- I don't know much about case tables in Emacs (and I don't have time to dig deeper into the Lisp Manual). Any suggestion on what SOME-CASE-TABLE-CODE should look like? Alexandre and Elias: Does this patch give good results? --8<---------------cut here---------------start------------->8--- --- nnheader.el 01 Aug 2006 12:10:19 +0200 7.24 +++ nnheader.el 07 Nov 2006 15:08:52 +0100 @@ -997,7 +997,13 @@ (val (symbol-value ffh))) (set ffh nil) (unwind-protect - (apply 'find-file-noselect args) + (with-current-buffer (apply 'find-file-noselect args) + (unless (or (featurep 'xemacs) + ;; Better check? + (< emacs-major-version 22)) + ;; Apply ASCII-only case-table. Don't modify the + ;; standard-case-table. + (set-case-table (make-char-table 'case-table)))) (set ffh val)))) (defun nnheader-directory-regular-files (dir) --8<---------------cut here---------------end--------------->8--- Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/