>>>> "clemens" == clemens
<clemens(a)ghanima.endorphin.org> writes:
clemens> This kind of preloading is common for all
clemens> not-just-for-fun lisp implementations,
We have preloading. However our design has other desiderata than
minimal dumping and startup time, as initializing the LISP engine is
not the binding constraint on startup time any more. (See below.)
clemens> When you look at
clemens>
http://www.emacswiki.org/cgi-bin/wiki/DumpingEmacs it
clemens> seems that the FSF emacs world also follows this path.
Well, I don't know how other LISPs do it. GNU Emacs uses the unexec
strategy, which in the current OS ferment takes up a pile of developer
time keeping up with various kernel, processor, and toolchain quirks,
as well as deliberate features like random load addresses used in
secure kernels. If unexec works at all, since it simply reloads a
memory image into the same place, it probably works fairly well for
your application.
XEmacs does have unexec functions, but on most platforms they are
deprecated in favor of the portable dumper.
However, I would consider any dumping strategy extremely dangerous for
use in any fashion other than batch due to references to external
state (see below). And in fact that's the way the wiki describes it:
rebuilding the binary at startup time. It would be easy enough to do
that with site-load.el and maybe small mods to dumped-lisp.el (eg, to
put the site-package list in $HOME) in XEmacs.
clemens> I already spotted that, but I can't use the require
clemens> directive here. Probably dumped-lisp.el works, but
clemens> actually I think redumping is much nicer.
From an extremely abstract viewpoint it's elegant. But it kind of
flies in the face of modern OS design. For example, if you want an
exact memory image that starts up fast, use your box's "suspend to
disk" function. In practice, what I might want is preloading of some
common applications. It takes less than 5 minutes to redump the whole
liston a 450MHz PII with a 66MHz bus and crummy drives, and since my
typical session runs for approximately 1000 times that long, who
cares? Not me, anyway! On the other hand, I don't want to dump a
session that has been running for three weeks and contains 100MB of
buffer and LISP data. So in the context of my application, I have to
disagree with you; redumping is merely cute.
You'll also find that you get much less speedup from such
optimizations in XEmacs than you will from GNU Emacs. GNU Emacs is
intended to be a monolithic application which you can tune to your
needs. XEmacs takes the modern (not necessarily "better", though)
approach of being intentionally modular, using lazy loading
throughout, an approach tuned for an application that is expected to
run for a very long time. XEmacs spends time at startup investigating
the local layout of libraries, and that's where most of XEmacs startup
time goes.
clemens> Still, not having any pdump_root_lisp_objects is clearly
clemens> a bug.
No, pdump is a special facility designed for use in this way. If you
have a better idea, feel free to implement it. But pdump as designed
has been a huge success in terms of minimizing developer time spent on
unexec bugs and in terms of giving us "free" ports to platforms with
established userlands running over kernels that we don't have
expertise in writing unexec for (eg, Darwin). Serendipitously, it has
also provided the foundation for a whole suite of new approaches to
garbage collection.
clemens> Naive approach: Is it feasable to use the root list as it
clemens> was at the time the original dump was made, or do we have
clemens> to reinitialize it?
Olivier (who is the expert) said probably not, but you're welcome to
try.
--
School of Systems and Information Engineering
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.