emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

require inside functions. (was: Changes in calendar/time-date.el)


From: Lute Kamstra
Subject: require inside functions. (was: Changes in calendar/time-date.el)
Date: Thu, 07 Apr 2005 14:47:45 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

address@hidden (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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]