[Newbies] SmartRefStream use

Stephan Eggermont 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?


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.


More information about the Beginners mailing list