> 
> Okay, I tried this and it still seems a bit slow:
> 
> | myFile ios |
> 
> ios := ReadWriteStream on: ''.
> 
> Transcript show: 'Populate Buffer: ',
>       (Time millisecondsToRun: [
>               1 to: 10000 do: [
>                       :x | ios nextPutAll: ((x asString) , 
> String crlf)
>                       ]]) asString , ' millseconds' ; cr.
> 
> Transcript show: 'Position: ', (ios position) asString ; cr.
> 
> myFile := StandardFileStream fileNamed: 'c:/test.txt'.
> 
> Transcript show: 'Output Buffer: ',
>                     (Time millisecondsToRun: [
>       myFile nextPutAll: (ios contents)]) asString,
>      ' milliseconds' ; cr.
> 
> myFile close.
> 
> # --
> 
> Populate Buffer is showing ~350 milliseconds to run on my 
> system whereas similar code in Perl is showing around 70 
> milliseconds.  Is this the correct way to use the stream?
> 
> Thanks,
> 
> Ian
> 
> On 08/04/07, Bert Freudenberg <[EMAIL PROTECTED]> wrote:
> >

Try taking out the Transcript show's from inside the loop, that's very slow.


Ramon Leon
http://onsmalltalk.com

_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners

Reply via email to