From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Add ".guile.sls" and ".sls" to the default %load-extensions Date: Tue, 06 Nov 2012 00:18:11 -0500 Message-ID: <87mwyvcnsc.fsf@tines.lan> References: <87fw4qgi1i.fsf@tines.lan> <87k3u16rak.fsf@gnu.org> <87k3u1knqn.fsf@delenn.lan> <87bofd6j24.fsf@gnu.org> <87k3u0kiny.fsf@delenn.lan> <87pq3s9j2b.fsf@gnu.org> <874nl3epxw.fsf@tines.lan> <87liefsqe0.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1352179132 32448 80.91.229.3 (6 Nov 2012 05:18:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Nov 2012 05:18:52 +0000 (UTC) Cc: guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Nov 06 06:19:02 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TVbYy-0002uA-MR for guile-devel@m.gmane.org; Tue, 06 Nov 2012 06:19:00 +0100 Original-Received: from localhost ([::1]:51802 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVbYp-0004nF-Jj for guile-devel@m.gmane.org; Tue, 06 Nov 2012 00:18:51 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVbYm-0004mn-MJ for guile-devel@gnu.org; Tue, 06 Nov 2012 00:18:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TVbYl-0003oU-9m for guile-devel@gnu.org; Tue, 06 Nov 2012 00:18:48 -0500 Original-Received: from world.peace.net ([96.39.62.75]:54894) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TVbYl-0003ln-4F; Tue, 06 Nov 2012 00:18:47 -0500 Original-Received: from 209-6-91-212.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.91.212] helo=tines.lan) by world.peace.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1TVbYP-0006cw-VH; Tue, 06 Nov 2012 00:18:26 -0500 In-Reply-To: <87liefsqe0.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 05 Nov 2012 22:15:19 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 96.39.62.75 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:15105 Archived-At: ludo@gnu.org (Ludovic Court=C3=A8s) writes: > My current inclination would be to fully reject it, then. Okay. > Currently there are two stat(2) for each entry in $GUILE_LOAD_PATH: [...] > That would double that. > > This is likely to become noticeable with large $GUILE_LOAD_PATH values > and/or numerous module loads. Yes, I worried about this too. Even now, the number of stat calls is unfortunate, especially for people who extend their %load-path. For Guile 2.2, it might be worthwhile to consider ways to reduce the expense of loading modules, and if so, maybe we can revisit this question later. One option would be to return to Aubrey Jaffer's model (used in SCM), where a catalog of modules and their locations is maintained and must be explicitly rebuilt when software is installed. Optionally, if the user attempted to load a module not found in the catalog, we could fall back to an explicit search, and if successful, issue a warning with a reminder to rebuild the catalog. Alternatively, on systems that support inotify (or something like it), we could construct this catalog during initialization and efficiently keep it up-to-date by receiving notifications when changes are made to the relevant directories, or when %load-path is changed. > (I=E2=80=99m not sure if searching for a file name with no extension is > intentional. Ideas?) I looked into this. Guile has searched for file names with no extension since its initial import into VCS in 1996 (0f2d19dd). Initially, names with no extension were searched _before_ *.scm, and this logic was hard-coded into the search procedure (try-module-autoload in boot-9.scm). Jim Blandy introduced the '%load-extensions' variable with default value ("" ".scm") later in 1996 (26544b96), and Mikael Djurfeldt reversed the order to (".scm" "") in 1999 (0a74e31d). It has been that way ever since. Mark