[squeak-dev] Why not just get rid of the sources file entirely (was: The Inbox: System-dtl.1277.mcz)

David T. Lewis lewis at mail.msen.com
Wed Jan 19 03:21:08 UTC 2022

On Mon, Jan 17, 2022 at 01:17:31PM -0500, David T. Lewis wrote:
> Rather that putting a lot of effort into figuring out how to package
> the sources file and how to locate sources files in various places
> for various different operating systems, why don't we just get rid
> of the file entirely?
> Traditionally the sources file is delivered as a disk file separate
> from the images file. That is good if you are dealing with small images
> and VMs with limited address space, but nowadays our 64-bit release
> image is over 50MB in size, and typical working images get much larger
> than that. Meanwhile, a compressed sources file is only(!) 6.7MB on disk.
> So rather than use files, just keep the sources in the image. It would
> work like this:
> - Load the compressed sources file into an object, hold it in a class var
> - If the in-image sources exist, use them, otherwise use file based sources
> - Allow the in-image sources to be cleared so that small images or images
>   transmitted over the network do not need to carry the sources along
> - Existing disk-based sources lookup would work as before
> I actually have this working now, and I am not seeing any problems when
> using the in-image sources. The sources file never needs to be reopened
> or located from the file system.
> The attached png shows an explorer on the sources file array in my
> image after changing over to the in-image compressed sources. The raw
> compressed data is highlighted in the explorer.
> If this sounds worthwhile, I'll clean it up a bit and post a change set
> or inbox submission.

As promised. Try loading DTL-internal-sources-dtl.4 from the inbox.

The postscript will create a compressed .stc if you do not already
have one in your image directory, then load the raw bytes into a
holder object in the image. It then reopens the sources files, at
which point the sources file no longer lives on rotating media.

Evaluate "CompressedSources clearCachedSources" to go back to the
old-school approach of rooting around through various directories
to find a traditional .sources or .stc file. Don't worry, this still
works just as well as it ever did.

Save your image first ... just sayin'


More information about the Squeak-dev mailing list