Source code in image...why not?

Stephen Pair spair at acm.org
Wed Jun 26 13:43:29 UTC 2002


AFAICT, there are two primary reasons for keeping source code outside of
the image:

1.  To keep the image size smaller
2.  To allow recovery of source code after an image crash

It would be nice to have an option to keep all source code inside the
image.  

As for reason #1, if you need to reduce the image size for deployment,
you could easily jettison all the sources.  It should also be easy to
switch between having sources inside the image and having them stored in
external sources and changes files.  And, if the sources are stored in
some compressed form, we could save a lot of the space that source code
uses (compressing SqueakV3.sources with WinZip shrinks the file from
14,202KB to 3,395KB).

To address reason #2, we could still write changes to a changes file,
however, after a successful image save, the changes file could be
cleared (thus, the changes file would only ever contain changes since
the last image save).  There could be setting that controlled how long
old versions of class defs and methods are retained, etc.  

Just a thought.  With today's large memory machines, it seems like we
should at least have the option of keeping sources in the image.

(also, I suppose we'd need the new compiled method format before this
could be done)

- Stephen




More information about the Squeak-dev mailing list