SmartRefStream use

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SmartRefStream use

Stephan Eggermont-3
I'm trying to measure SmartRefStream performance.
I'm a bit confused on what kind of buffer I can use
in combination with what kind of stream.

Writing the object to file works.
Do I need to write an end marker to the buffer?


Transcript show:
        [ |buffer srf book stream|
                buffer := (ByteString new: 10000).
                stream := (RWBinaryOrTextStream on: buffer).
                srf := SmartRefStream on: stream.
                srf nextPut: (XLSWorkbook new).
                srf close.
                20 timesRepeat: [
                        stream := RWBinaryOrTextStream with: buffer.
                        stream reset.
                        book := stream fileInObjectAndCode.
                ]] timeToRun asString.
Transcript cr.
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners