From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Ralf Angeli Newsgroups: gmane.emacs.devel Subject: Re: `make' written in elisp Date: Tue, 04 Jan 2005 12:17:18 +0100 Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1104840446 1339 80.91.229.6 (4 Jan 2005 12:07:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 4 Jan 2005 12:07:26 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 04 13:07:17 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ClnT2-00039B-00 for ; Tue, 04 Jan 2005 13:07:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1ClneF-00085W-6C for ged-emacs-devel@m.gmane.org; Tue, 04 Jan 2005 07:18:51 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Clne5-00085Q-0r for emacs-devel@gnu.org; Tue, 04 Jan 2005 07:18:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Clne4-000857-7b for emacs-devel@gnu.org; Tue, 04 Jan 2005 07:18:40 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Clne3-00084l-Tk for emacs-devel@gnu.org; Tue, 04 Jan 2005 07:18:40 -0500 Original-Received: from [134.96.7.25] (helo=triton.rz.uni-saarland.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ClnRd-0004Ph-T9; Tue, 04 Jan 2005 07:05:50 -0500 Original-Received: from iwi-gate.iwi.uni-sb.de (iwi-gate.iwi.uni-sb.de [134.96.72.13]) by triton.rz.uni-saarland.de (8.12.10/8.12.10) with ESMTP id j04BHNqI1136529; Tue, 4 Jan 2005 12:17:24 +0100 (CET) Original-Received: from [134.96.72.190] (helo=neutrino.iwi.uni-sb.de) by iwi-gate.iwi.uni-sb.de with esmtp (Exim 4.33; FreeBSD) id 1Clmgf-000AWT-EF; Tue, 04 Jan 2005 12:17:17 +0100 Original-Received: from angeli by neutrino.iwi.uni-sb.de with local (Exim 4.43) id 1Clmgg-000389-Km; Tue, 04 Jan 2005 12:17:18 +0100 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Mon, 03 Jan 2005 22:38:24 -0500") User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) X-IWi-MailScanner-Information: Please contact the ISP for more information X-IWi-MailScanner: Found to be clean X-IWi-MailScanner-SpamCheck: not spam, SpamAssassin (score=0, required 5) X-MailScanner-From: angeli@iwi.uni-sb.de X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.1 (triton.rz.uni-saarland.de [134.96.7.25]); Tue, 04 Jan 2005 12:17:24 +0100 (CET) X-AntiVirus: checked by AntiVir Milter 1.0.6; AVE 6.29.0.5; VDF 6.29.0.45 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: main.gmane.org gmane.emacs.devel:31812 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:31812 * Richard Stallman (2005-01-04) writes: > I am surprised to hear that. Many Emacs Lisp packages search for > files they need to use, and they generally do so either when first > loaded into a session, or each time they are executed. We have never > tried to make any of them save the results between sessions, but it > seems to be fast enough. > > Is AUCTeX doing something that is particularly slow? That depends on how you define slow. I just extracted the relevant code for testing purposes and using `time' with the resulting shell script I got the following execution times on a Pentium M 1,7 (currently running at 600MHz): real 0m0.114s user 0m0.084s sys 0m0.018s In the meantime I reimplemented the functionality in Elisp. Using (abs (- (prog1 (float-time (current-time)) (TeX-input-dirs)) (float-time (current-time)))) for measuring the execution time I got an average of about 0.06 seconds for executing the function `TeX-input-dirs'. While I am not really fond of having the function executed every time the package is loaded, it is probably an acceptable delay. And, as David already mentioned, we could find ways to save its output and subsequently inhibit its execution until a user calls some reconfiguration procedure. > Besides writing values to init files the configuration process is used > to check if external tools required for building or running the > package are present and provide necessary features. A special case > might be preview-latex which has a TeX part besides the Elisp part. > > Why is it necessary to do this? > It seems to me that it would be just fine > to look for these things when the user tries to use them. > > to try to use the command when the user asks to do I don't think it is feasible to check for program versions every time a program is called. And instead of letting the user alone with error messages which don't give him a hint that the program is too old, I consider it better practice to tell him when he tries to install the software which relies on the external program. -- Ralf