Gisle S�lensminde <·····@kaktus.ii.uib.no> writes:
> I have a program where I'm working in huge data structures, trees
> in this case. The basic structure looks as follows:
>
> (defstruct tree-node
> name
> parent
> children
> properties)
>
> The name is the name of the node (string), children is reference to
> the child nodes, while properties is an assoc-list with properties
> of the node or the branch leading to this node. parent is a reference
> to the parent node. These trees can be quite big (up to 180,000 leaf
> nodes). Now I'm creating a core file, and restart that (fast) or
> reread the data from an extarnal format (slow). I would like to be
> able to dump the running data structure and reload it into a running
> lisp session, and not start from a dump/core. (I can do that too, but
> I want to be be able to read the data without restarting) This will
> be much like serializing in java or pickling in python.
>
> I'm using CMUCL on sparc, so a CMUCL-specific solution would be OK,
> while a portable solution (if possible) would be a bonus.
The easiest way I know is this, and it is quite fast too.
http://groups.google.com/groups?selm=fz3cinaag0.fsf%40cupid.igpm.rwth-aachen.de&output=gplain
Be aware, however, that fasl files are incompatible from version to
version. So if you update your Lisp you have to export from old
version/import to new version via some other format.