Hi guys. Together with Martin we are developing a fast object graph serializer called Fuel. The idea is to use a pickle format similar to VW Parcels. Right now we are able to correctly serialize (almost) all kind of objects (from different classes and so on). The algorithm is working quite well and we are already quite fast. We also know how to encode more or less efficient some of the "primitive" classes like Floats, SmallIntegers, ByteString, ByteArray, etc, etc.�

What we really don't know anything about streams. For example, until now, we were using just a MultiByteFileStream and doing all the time things like #next:� #nextPutAll:� #nextWordPut: etc...

Now Igor told us for example, to use a buffer like this:

��� | bufferStream |
��� bufferStream := ByteArray new writeStream.

��� (FLSerializer on: bufferStream)
��� ��� serialize: anArrayToSerialize.

��� aFileStream nextPutAll: bufferStream contents.

and that it at least 2 times faster than we were doing.... I guess it is because it goes to the disk only once. But MultiByteFileStream uses a buffer, doesn't it ?

For reading (deserialization) we are not doing nothing special. We just open the file stream and we read with #next� #nextString ... etc.

Another thing is which kind of file stream should we use. MultiByteFileStream ? StandardFileStream ?

So...before spending time in some optimizations, are there "known" things that� we should check?

Thanks in advance,


--
Mariano
http://marianopeck.wordpress.com