From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: require inside functions. Date: Fri, 08 Apr 2005 10:16:47 +0200 Message-ID: References: <871x9w9dkn.fsf@xs4all.nl> <87mzsezu5f.fsf@xs4all.nl> <87hdimzou0.fsf@xs4all.nl> <87ll7uwy6m.fsf_-_@xs4all.nl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1112948772 15921 80.91.229.2 (8 Apr 2005 08:26:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 8 Apr 2005 08:26:12 +0000 (UTC) Cc: Lute Kamstra , reiner.steib@gmx.de, ding@gnus.org, emacs-devel@gnu.org, storm@cua.dk, snogglethorpe@gmail.com, miles@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 08 10:26:10 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DJoo3-0007YX-3M for ged-emacs-devel@m.gmane.org; Fri, 08 Apr 2005 10:25:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DJoNO-0004c1-GH for ged-emacs-devel@m.gmane.org; Fri, 08 Apr 2005 03:58:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DJoG0-0005ME-Ke for emacs-devel@gnu.org; Fri, 08 Apr 2005 03:50:26 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DJoFs-0005LA-Ca for emacs-devel@gnu.org; Fri, 08 Apr 2005 03:50:18 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DJoFl-0005Jq-5i for emacs-devel@gnu.org; Fri, 08 Apr 2005 03:50:10 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DJogV-0008Sj-2R for emacs-devel@gnu.org; Fri, 08 Apr 2005 04:17:47 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1DJofB-00054v-6c; Fri, 08 Apr 2005 04:16:25 -0400 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Thu, 07 Apr 2005 23:22:22 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:35747 gmane.emacs.gnus.general:60122 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35747 Richard Stallman writes: > (require 'ft) only loads a file if 'ft is not in features. However, > it unconditionally adds '(require . ft) to current-load-list. If you > call a function with require a million times, this eats up 16 MB of > memory. > > This was done deliberately. The idea is that it's useful > to record that file foo depends on file bar, even if bar > was already loaded before foo. > > However, it isn't useful to record (require . bar) an additional > time in current-load-list when it's already there. So I think the > right fix is to check with Fmember and not add it a second time. Probably a performance issue? Maybe the check for it already being present should be done using a hashtable, say current-load-hashtable? -- David Kastrup, Kriemhildstr. 15, 44793 Bochum