<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: The following program hangs the heap snapshot tool"
   href="https://bugs.webkit.org/show_bug.cgi?id=163155#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Web Inspector: The following program hangs the heap snapshot tool"
   href="https://bugs.webkit.org/show_bug.cgi?id=163155">bug 163155</a>
              from <span class="vcard"><a class="email" href="mailto:joepeck&#64;webkit.org" title="Joseph Pecoraro &lt;joepeck&#64;webkit.org&gt;"> <span class="fn">Joseph Pecoraro</span></a>
</span></b>
        <pre>Running with `jsc`:

```
var stringArray;
var stringCount = 10000000;
var allocateMemory = function() {
    stringArray = new Array(stringCount);
    for (var i = 0; i &lt; stringCount; ++i) {
        stringArray[i] = String(i);
    }
}
allocateMemory();

var start = Date.now();
var snapshotObject = generateHeapSnapshot();
var end = Date.now();

print(&quot;&quot; + ((end - start) / 1000) + &quot; seconds&quot;);
print(&quot;&quot; + (JSON.stringify(snapshotObject).length / 1024 / 1024) + &quot;MB&quot;);
```

On my Mac Pro this takes ~20s and the JSON string is ~500MB.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>