<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font face="Georgia">Can you write a snippet that exhibits the same
      behavior, both to show us and to try on non-cog? What does #commit
      look like? What does the dictionary look like?<br>
      <br>
      Cheers,<br>
      Bob<br>
      <br>
    </font>
    <div class="moz-cite-prefix">On 1/9/13 11:33 PM, Colin Putney wrote:<br>
    </div>
    <blockquote
cite="mid:CAD+=c1g6hBuJ6ZSy2_mi0HsjJpMFdF9a9nYtnSfze9ABkKxbCA@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi all,
        <div><br>
        </div>
        <div style="">I'm trying to optimize some slow code, but having
          trouble getting a time profile that shows where the time is
          being spent. Here'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">&nbsp;- 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">&nbsp; 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">&nbsp; 95.5%
                {29848ms} ALReadWriteTransaction&gt;&gt;commit</font></div>
          </div>
          <div style="">
            <div style=""><font face="courier new, monospace">&nbsp; &nbsp; 94.7%
                {29593ms} Dictionary&gt;&gt;keysAndValuesDo:</font></div>
          </div>
          <div style="">
            <div style=""><font face="courier new, monospace">&nbsp; &nbsp; &nbsp;
                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,&nbsp;Dictionary&gt;&gt;associationsDo:
            isn't really a leaf method. I suspect that Cog is generating
            native code for the contents of the loop and it's not
            getting interrupted by the tally process.&nbsp;(I'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>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">
</pre>
    </blockquote>
    <br>
  </body>
</html>