Hi Chris,<br><br>Sorry for my delay, thank you very much for your answer and for the tips about benchmarking. I also agree in that both serializers have different purposes and so different features and limitations and so looking who is the fastest is not the best comparison.<br>
<br>Another question: have you benchmarked the memory use while serializing or materializing? I have never. I know that there is something called SpaceTally but I don&#39;t know about it.<br><br>Cheers,<br>Martin<br> <br>
<br><div class="gmail_quote">On Fri, Jun 3, 2011 at 1:30 PM, Chris Muller <span dir="ltr">&lt;<a href="mailto:ma.chris.m@gmail.com">ma.chris.m@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">&gt;&gt;  - Instantiatation / initialization of a MaObjectSerializer.<br>
&gt;&gt;  - Serialization of object graphs of various sizes.<br>
&gt;<br>
&gt; If you have by chance some code snippets to generate graphs for testing<br>
&gt; (maybe you have that in Magma) let us know :)<br>
&gt; We can a pice of code that generates binary trees...<br>
<br>
</div>Yes, see MaFixtureFactory.<br>
<br>
  MaFixtureFactory current samples<br>
<br>
or<br>
<br>
  MaFixtureFactory current knot<br>
<br>
There was a discussion recently about comparing object graphs -- you<br>
may be interested in MaObjectSerializerTester, and how it verifies<br>
serialized--&gt;remateralized object graphs of any shape against the<br>
original fixture graph.  Very useful for ensuring your serializer is<br>
_working_.  :)  See MaObjectSerializerTestCase&gt;&gt;#testSamples which<br>
sends #maEquivalentForSerializationTest: to determine that..<br>
<div class="im"><br>
&gt;&gt; &quot;Serialization&quot;<br>
&gt;&gt; | obj ser |<br>
&gt;&gt; obj := Array with: 1 with: &#39;string&#39;.<br>
&gt;&gt; ser := MaObjectSerializer new.<br>
&gt;&gt; [ ser serializeGraph: obj ] bench<br>
&gt;&gt;<br>
&gt;<br>
&gt; With the rest of the serializers that we do is to serialize the graph into a<br>
&gt; file. How could we do this with Magma Serializer?<br>
&gt; because serializeGraph: answers a MaSerializedGraphBuffer. So, I guess I can<br>
&gt; ask the byteArray to it and do a nextPutAll: or something like that to our<br>
&gt; stream?<br>
<br>
</div>Yes.  I, of course, always appreciated the elegance of the notion that<br>
MaObjectSerializer could operate directly on Streams, but the problem<br>
is that I also want a secure client-server protocol which wraps the<br>
serialized requests and responses.  So to, for example, calculate a<br>
MAC, the full byteArray of the request is required in advance.  It&#39;s<br>
ok though, serialized / materialized objects have to fit into memory<br>
anyway, so a streaming API doesn&#39;t really offer any practical<br>
advantage - just elegance.<br>
<div class="im"><br>
&gt; We also have in Fuel what we call &quot;in memory serialization&quot; that basically<br>
&gt; returns the byteArray and then we can materialize from that. So this case<br>
&gt; would be similar to this usage of Magma, wouldn&#39;t it ?<br>
<br>
</div>Yeah - similar to use of &quot;Ma object serializer&quot;.  (IOW, you don&#39;t have<br>
to load Magma to use MaObjectSerializer), you can just load MaBase.<br>
<div class="im"><br>
&gt;&gt; As I said, benching is tricky, and publishing comparisons even<br>
&gt;&gt; trickier<br>
&gt;<br>
&gt; yes, exactly. The problem is in addition that there are supported features<br>
&gt; of a serializer that inpacts on the results of a benchmark. For example,<br>
&gt; supported class reshapes, initialization after materialization, support<br>
&gt; transient instVars...etc... to support all those things you usually spend<br>
&gt; more time. So maybe you support all that and in the results you are slower<br>
&gt; in comparisson with someone that do not support that. So yes, measuring<br>
&gt; speed only is not good. But taking into account the rest of the properties<br>
&gt; is better.<br>
<br>
</div>Yip!  Glad you said that.<br>
<font color="#888888"><br>
 - Chris<br>
</font></blockquote></div><br>