This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

dynamic linking, unexec, and the freezer



Hi,

There have been complaints about raw guile's startup time.  For good
reason --- on my machine it's about ten seconds.  So somebody grabbed
the unexec mechanism from emacs.  This will let you store the state of
a program in mid-execution.  Thus you can even execute your own scheme
code and save it.

Unfortunately, this means that you can't use a dynamic library in
unexeced code --- the dumped executable can't find the library and
segfaults.  This limits unexec seriously --- if people want to unexec
their guile, they have to statically link any extensions they may want
to use from preloaded code.  Unfortunately, this means rewriting both
C and scheme code, since the interface to statically linked libraries
is totally different from that used for dynamic libs.  

As a concrete example, the ctax package constructs a parser and a
lexer, both of which require the construction of non-trivial tables.
It would be nice to be able to unexec these to greatly speed
execution.  Unfortunately, the ctax package uses the rx package, a
dynamically loaded module. 

Would the freezer help with this?  Hobbit might, but it would just
mean the bootup runs a little faster, rather than being precomputed. 

Andrew
aarchiba@undergrad.math.uwaterloo.ca