From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lute Kamstra Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: require inside functions. (was: Changes in calendar/time-date.el) Date: Thu, 07 Apr 2005 14:47:45 +0200 Message-ID: <87ll7uwy6m.fsf_-_@xs4all.nl> References: <871x9w9dkn.fsf@xs4all.nl> <87mzsezu5f.fsf@xs4all.nl> <87hdimzou0.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 1112878263 5590 80.91.229.2 (7 Apr 2005 12:51:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 7 Apr 2005 12:51:03 +0000 (UTC) Cc: miles@gnu.org, snogglethorpe@gmail.com, Reiner Steib , ding@gnus.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 07 14:50:58 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DJWSZ-0002n9-1a for ged-emacs-devel@m.gmane.org; Thu, 07 Apr 2005 14:50:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DJW1r-0000WD-JP for ged-emacs-devel@m.gmane.org; Thu, 07 Apr 2005 08:22:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DJVzQ-0007te-Ng for emacs-devel@gnu.org; Thu, 07 Apr 2005 08:20:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DJVzQ-0007tS-AP for emacs-devel@gnu.org; Thu, 07 Apr 2005 08:20:04 -0400 Original-Received: from [194.109.24.35] (helo=smtp-vbr15.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DJWRU-00015C-D6; Thu, 07 Apr 2005 08:49:04 -0400 Original-Received: from pijl (a80-127-67-124.adsl.xs4all.nl [80.127.67.124]) by smtp-vbr15.xs4all.nl (8.12.11/8.12.11) with ESMTP id j37Cm7ff098354; Thu, 7 Apr 2005 14:48:08 +0200 (CEST) (envelope-from Lute.Kamstra@xs4all.nl) Original-Received: from lute by pijl with local (Exim 3.36 #1 (Debian)) id 1DJWQG-0002Hn-00; Thu, 07 Apr 2005 14:47:48 +0200 Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: (Kim F. Storm's message of "Tue, 05 Apr 2005 12:06:19 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Original-Lines: 18 X-Virus-Scanned: by XS4ALL Virus Scanner 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:35695 gmane.emacs.gnus.general:60112 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35695 storm@cua.dk (Kim F. Storm) writes: [...] > Putting require into a function _does_ slow it down. I decided to test this. The speed effect is really minimal, but I did discover a more serious problem with putting a require inside a function that is called often. (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. Should this be fixed somehow? Lute.