<div dir="ltr">Hi all,<div><br></div><div style>I&#39;m trying to optimize some slow code, but having trouble getting a time profile that shows where the time is being spent. Here&#39;s the results from MessageTally class&gt;&gt;spyOn:</div>
<div style><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div style><div style><font face="courier new, monospace"> - 31249 tallies, 31251 msec.</font></div></div><div style><div style><font face="courier new, monospace"><br>
</font></div></div><div style><div style><font face="courier new, monospace">**Tree**</font></div></div><div style><div style><font face="courier new, monospace">--------------------------------</font></div></div><div style>
<div style><font face="courier new, monospace">Process: other processes</font></div></div><div style><div style><font face="courier new, monospace">--------------------------------</font></div></div><div style><div style>
<font face="courier new, monospace">3.9% {1233ms} EventSensor&gt;&gt;eventTickler</font></div></div><div style><div style><font face="courier new, monospace">  3.9% {1231ms} Delay&gt;&gt;wait</font></div></div><div style>
<div style><font face="courier new, monospace">--------------------------------</font></div></div><div style><div style><font face="courier new, monospace">Process: (40s) 77070: nil</font></div></div><div style><div style>
<font face="courier new, monospace">--------------------------------</font></div></div><div style><div style><font face="courier new, monospace">95.5% {29853ms} ALReadWriteTransaction(ALTransaction)&gt;&gt;commit:</font></div>
</div><div style><div style><font face="courier new, monospace">  95.5% {29848ms} ALReadWriteTransaction&gt;&gt;commit</font></div></div><div style><div style><font face="courier new, monospace">    94.7% {29593ms} Dictionary&gt;&gt;keysAndValuesDo:</font></div>
</div><div style><div style><font face="courier new, monospace">      94.7% {29593ms} Dictionary&gt;&gt;associationsDo:</font></div></div><div style><div style><font face="courier new, monospace">**Leaves**</font></div></div>
<div style><div style><font face="courier new, monospace">94.7% {29593ms} Dictionary&gt;&gt;associationsDo:</font></div></div><div style><div style><font face="courier new, monospace">3.9% {1231ms} Delay&gt;&gt;wait</font></div>
</div><div style><div style><font face="courier new, monospace"><br></font></div></div><div style><div style><font face="courier new, monospace">**Memory**</font></div></div><div style><div style><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>old<span class="" style="white-space:pre">                        </span>+891,120 bytes</font></div>
</div><div style><div style><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>young<span class="" style="white-space:pre">                </span>-273,076 bytes</font></div></div><div style><div style><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>used<span class="" style="white-space:pre">                </span>+618,044 bytes</font></div>
</div><div style><div style><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>free<span class="" style="white-space:pre">                </span>-618,044 bytes</font></div></div><div style><div style><font face="courier new, monospace"><br>
</font></div></div><div style><div style><font face="courier new, monospace">**GCs**</font></div></div><div style><div style><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>full<span class="" style="white-space:pre">                        </span>0 totalling 0 ms (0% uptime)</font></div>
</div><div style><div style><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>incr<span class="" style="white-space:pre">                        </span>56 totalling 28 ms (0.1% uptime), avg 0.5 ms</font></div>
</div><div style><div style><font face="courier new, monospace"><span class="" style="white-space:pre">        </span>tenures<span class="" style="white-space:pre">                </span>12 (avg 4 GCs/tenure)</font></div></div><div style><div style>
<font face="courier new, monospace"><span class="" style="white-space:pre">        </span>root table<span class="" style="white-space:pre">        </span>0 overflows</font></div></div></blockquote><div style><div> </div><div><br></div>
<div><br></div><div style>Obviously, Dictionary&gt;&gt;associationsDo: isn&#39;t really a leaf method. I suspect that Cog is generating native code for the contents of the loop and it&#39;s not getting interrupted by the tally process. (I&#39;ve tried running on an interpreter VM, but it fails with FFI errors, so no help there.)</div>
<div style><br></div><div style>Anybody have any ideas for how to get a better profile?</div><div style><br></div><div style>Colin</div></div></div>