[squeak-dev] Re: Xtreams file handles

David T. Lewis lewis at mail.msen.com
Sun Aug 14 14:36:40 UTC 2011

On Sun, Aug 14, 2011 at 03:51:25PM +0200, Nicolas Cellier wrote:
> IMO the ExternalResource could be a common denominator used by various
> Stream implementations.
> I would not be amazed to see such class hierarchy both in trunk &
> Pharo core before a few months.

That sounds good to me. I should mention two things that I learned
when doing IOHandle back in 2002:

1) There was a small but measurable performance impact related to
the extra level of indirection. I believe that this was due to the
large number of single-byte IO operations that were happening in
file streams, and IMO this would be an acceptable tradeoff. However,
we should measure the impact on a modern Squeak image to make sure
we do not cause  a performance problem.

2) The only difficult part about implementing IOHandle was the
upgrade stream. This is a case of changing the tires while the
car is moving, and it is necessary to ensure that the file streams
on the changes file and any source files continue to function as
the updates are performed. For IOHandle I did this with two change
sets with preamble/postscript actions. Something similar would be
needed for the Squeak trunk update stream, as well as for the
Pharo updates (I'm not sure how they work).

BTW, I'd be happy to help with this, but my time will be quite
limited for the next few months so I don't know how much help
I can provide.


More information about the Squeak-dev mailing list