[squeak-dev] Compressed sources
bert at freudenbergs.de
Thu Jan 14 14:30:48 UTC 2010
On 14.01.2010, at 04:40, David T. Lewis wrote:
> On Wed, Jan 13, 2010 at 09:54:34PM -0500, David T. Lewis wrote:
>> On Wed, Jan 13, 2010 at 11:59:01PM +0100, Bert Freudenberg wrote:
>>> On 13.01.2010, at 23:51, Eliot Miranda wrote:
>>>> On Wed, Jan 13, 2010 at 2:35 PM, Bert Freudenberg <bert at freudenbergs.de> wrote:
>>>>> I seem to remember a hack that allowed the sources file to be compressed on disk.
>>>>> It would be uncompressed on-the-fly. Does someone remember that hack? I couldn't find it.
>>>> CompressedSourceStream & SystemDictionary>>compressSources is in our 3.8 derived Teleplace images.
>>> Ah, great, thanks! Scott also pointed me to this:
>> The necessary support has somehow survived in Squeak trunk as well,
>> see also FileDirectory class>>openSources:forImage:
>> #compressSources encounters an error in trunk, but a little bit of fiddling
>> around would probably get it working.
>> It looks like you just need to write a compressed EtoysV3.sources.stc
>> file using #compressSources, and it might just work :)
The compression appears to work fine but it actually does not correctly deal with Unicode characters. I added a fix at
> Attached .cs is all that is required to produce a compressed sources
> file that seems to work correctly on a 3.8 image. It does *not* produce
> a usable compressed sources file on a Squeak trunk image, but that can
> be a problem for another day.
Is the symptom similar to what I see in Etoys?
> I would spend a few minutes browsing source code to make sure nothing
> is broken, but at first blush it seems fine.
> All I had to do is 'Smalltalk compressSources', quit the image, delete
> the normal sources file, restart the image, and viola it was using
> the compressed SqueakV3.stc file instead of SqueakV3.sources.
You don't even need to delete the old sources file, the compressed one is searched for first. Just put it next to the image.
Maybe my fix for Etoys works in trunk too?
- Bert -
More information about the Squeak-dev