[Newbies] SmartRefStream use
stephan at stack.nl
Wed May 27 21:45:12 UTC 2009
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?
[ |buffer srf book stream|
buffer := (ByteString new: 10000).
stream := (RWBinaryOrTextStream on: buffer).
srf := SmartRefStream on: stream.
srf nextPut: (XLSWorkbook new).
20 timesRepeat: [
stream := RWBinaryOrTextStream with: buffer.
book := stream fileInObjectAndCode.
]] timeToRun asString.
More information about the Beginners