[Newbies] Speed

John Worden worden.john at gmail.com
Sun Nov 15 21:26:30 UTC 2009


Thanks to all.

Interesting and educational.

John



On Mon, Nov 16, 2009 at 12:17 AM, Bert Freudenberg <bert at freudenbergs.de>wrote:

>
> On 14.11.2009, at 23:07, John Worden wrote:
>
> > So are you saying that my example is slow because of the time taken to
> process the text data files in Squeak? (I was using 3.10)
> >
> > Not that it matters in this case but how would I work around this if it
> were a real application that needed to handle data in this way?
> >
> > John
>
> If you do, e.g.,
>
>        FileStream readOnlyFileNamed: myFileName
>
> it creates a MultiByteFileStream nowadays (see #concreteStream). It would
> be nice if we could just set a no-op converter in a MultiByteFileStream.
> However, that class has not been optimized for speed yet, even without an
> expensive converter it is much slower. It reads characters one-by-one
> instead of block-wise, which obviously isn't speedy exactly, as you noticed.
>
> Instead of the abstract FileStream use the stream class you want
> explicitly. StandardFileStream is the old class that does no conversion. So
> you would open your file like this instead:
>
>        StandardFileStream readOnlyFileNamed: myFileName
>
> - Bert -
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20091116/46bf0d70/attachment.htm


More information about the Beginners mailing list