Q about a Squeak Archeology problem

Dwight Hughes dwighth at ipa.net
Wed Jan 12 05:14:17 UTC 2000


Les Tyrrell wrote:
> 
> Luckily, I do have good change logs.  Which brings up an interesting point about
> releases- I've noticed that condensing the changes on the release images can shave
> anywhere from a few bytes to a few thousand bytes off the corresponding change log-
> I assume that this is merely dropping extra doits that might be left in the image.
> On a 10mb release it's not much to worry about, but I thought I'd mention it anyway-
> my only actual concern was whether source code is lost when I do that, which I doubt
> very much.  For me, it's an issue of being able to state that "That's the way it
> actually was when i found it, give or take a few piddling things that are not important"

If you are looking at some of the more recent release packages prepared
by Bruce ONeel, many of these have all current updates applied - so they
may well contain a few K of changes that could be condensed, but I would
*not* want him to condense the changes after applying the updates. I
think it is important to keep the changes log of all applied updates to
the base release - condensing loses the previous versions of changed
methods.

> Another question: is it safe to assume that ALL source code associated with an
> image can be found in either the .sources or the .changes file, 

Yes, but note that this is not the same as saying that the .sources and
.changes files contain all the code necessary to recreate the
corresponding image.

>                                                                  AND that ALL
> code found in the .changes and .sources represents code that can be found in
> the image?  

In general, no. But this _is_ true right after you do a #condenseSources
- which writes all the active source chunks in both the .changes and the
.sources files into a new .sources files and creates a new nearly empty
.changes file.

>            I suppose that a condensed .changes might lose the fact that something
> has been deleted ( things that stored their source in .sources, for instance ), but
> would still have the things that have been added.  No need to answer this right off,
> I'll probably find out soon enough.

The source chunk in the .sources file for (say) a method that was
deleted would simply have no method source pointer to it in the image
any more - but until you do a #condenseSources the abandoned chunk would
remain. A condensed .changes file contains _only_ the source chunks for
the _last_ compiled/accepted version of any code added or changed since
the .sources file was created, minus the various doits and such (note,
however, if you revert to a previous version of a method, the source for
the last compiled version will not actually be the last version present
in an uncondensed .changes file -- but only the chunk pointed to by the
method source pointer will be saved during condensing).

I just ran #condenseSources on 2.7:

before:
Squeak2.7.changes	 7,760,437 bytes
SqueakV2.sources	 5,602,467 bytes

after:
Squeak2.7.changes	       180 bytes
SqueakV2.sources	10,935,101 bytes

For a reduction of 2,427,623 bytes. So almost half of the distributed
SqueakV2.sources file is now made up of abandoned source code chunks.

-- Dwight





More information about the Squeak-dev mailing list