The C code of SXEmacs is just a Lisp engine with a lot of built-in primitives useful for writing an editor. The editor itself is written mostly in Lisp, and represents around 100K lines of code. Loading and executing the initialization of all this code takes a bit a time (five to ten times the usual startup time of current xemacs) and requires having all the lisp source files around. Having to reload them each time the editor is started would not be acceptable.
The traditional solution to this problem is called dumping: the build process first creates the lisp engine under the name temacs, then runs it until it has finished loading and initializing all the lisp code, and eventually creates a new executable called xemacs including both the object code in temacs and all the contents of the memory after the initialization.
This solution, while working, has a huge problem: the creation of the new executable from the actual contents of memory is an extremely system-specific process, quite error-prone, and which interferes with a lot of system libraries (like malloc). It is even getting worse nowadays with libraries using constructors which are automatically called when the program is started (even before main()) which tend to crash when they are called multiple times, once before dumping and once after (IRIX 6.x libz.so pulls in some C++ image libraries thru dependencies which have this problem). Writing the dumper is also one of the most difficult parts of porting SXEmacs to a new operating system. Basically, ‘dumping’ is an operation that is just not officially supported on many operating systems.
The aim of the portable dumper is to solve the same problem as the system-specific dumper, that is to be able to reload quickly, using only a small number of files, the fully initialized lisp part of the editor, without any system-specific hacks.
|• Data descriptions:|
|• Dumping phase:|
|• Reloading phase:|
|• Remaining issues:|