From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?Arne_J=C3=B8rgensen?= Newsgroups: gmane.emacs.devel Subject: Re: latexenc-find-file-coding-system is slow. Date: Fri, 29 Apr 2005 16:57:41 +0200 Organization: Arne Joergensen -- http://arnested.dk/ Message-ID: <874qdpaavu.fsf@arnested.dk> References: <87ekcxrbb8.fsf@arnested.dk> <87u0lpye89.fsf_-_@xs4all.nl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1114973867 12382 80.91.229.2 (1 May 2005 18:57:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 1 May 2005 18:57:47 +0000 (UTC) Cc: Lute Kamstra Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 01 20:57:43 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DSJcy-0004ME-37 for ged-emacs-devel@m.gmane.org; Sun, 01 May 2005 20:57:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DSJji-0004oh-Oa for ged-emacs-devel@m.gmane.org; Sun, 01 May 2005 15:04:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DSIcB-0000in-VA for emacs-devel@gnu.org; Sun, 01 May 2005 13:52:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DSIZq-0007sz-JQ for emacs-devel@gnu.org; Sun, 01 May 2005 13:49:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DSIVy-0005r2-94 for emacs-devel@gnu.org; Sun, 01 May 2005 13:45:58 -0400 Original-Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_ARCFOUR_SHA:16) (Exim 4.34) id 1DSIYf-0004be-Fy for emacs-devel@gnu.org; Sun, 01 May 2005 13:48:45 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by mx20.gnu.org with esmtp (Exim 4.34) id 1DRX7g-0004zC-UO for emacs-devel@gnu.org; Fri, 29 Apr 2005 11:09:45 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DRWtF-0005Zh-8Y for emacs-devel@gnu.org; Fri, 29 Apr 2005 16:54:49 +0200 Original-Received: from 213.237.94.152 ([213.237.94.152]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 29 Apr 2005 16:54:49 +0200 Original-Received: from arne by 213.237.94.152 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 29 Apr 2005 16:54:49 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 59 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 213.237.94.152 X-Face: 5t,7/Y$&<1A_t.$vC2{pWZ{m@3_06; kcm]no{hgEL/}Uz(>XV6cl4}xO\v?-h3%>znNaZtq `~rf,GY1T%r=a.zH`hOb(-]'x)nI088Z&|e;V^h;/TShou User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:9UulsW2HwfoTysbkC1WjReTHu7U= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:36549 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36549 Lute Kamstra writes: > Thien-Thi Nguyen writes: > >> Arne Jørgensen writes: >> >>> Richard Stallman wrote March 4, 2005: >>> >>> > We can now install them. Could you send me the >>> > latest version of your changes, with change log >>> > entries? >>> >>> So now I'm trying to post to list >> >> i have installed the files w/ the suggested names; >> only modification was to re-indent latexenc.el. > > Since this change, opening a 117k .texi file takes seconds. First of all latexenc-find-file-coding-system shouldn't search .texi files. I just tested it and in my emacs it is not called on .texi files, but there could be something wrong with the entry in file-coding-system-alist: ("\\.tex\\|\\.ltx\\|\\.dtx\\|\\.drv\\'" . latexenc-find-file-coding-system) Does that entry match .texi files? Secondly the problem will of course still be there on large .tex files etc. which latexenc-find-file-coding-system is supposed search. See below. But my guess is .tex files normally doesn't grow as large as .texi files. YMMV. > It used > to take a fraction of a second. I did a debug-on-quit during the wait > a couple of times and that consistently gave me one of these two > backtraces: [...] > I guess the re-searching in latexenc-find-file-coding-system needs to > be improved. latexenc-find-file-coding-system re-searches all of the files for an \inputencoding{...} command and if none is found it re-searches all of the file for an \usepackage[...]{inputenc} command. The two re-search-forward's could of course be limited to only search the first n positions of the buffer. The problem is though to find decent defaults for these limits. It would be possible to introduce some variables for these limits and let people customize them for their individual needs/tastes. Kind regards, -- Arne Jørgensen