_calculateFlags speed is about 10k edges per second. It requires 150sec for the snapshot with 1.5m edges. The root of problem is var node = list.shift(); It is not effective in term of memory and cpu. In our case it can be replaced with pop().
Created attachment 122389 [details] Patch
Comment on attachment 122389 [details] Patch Clearing flags on attachment: 122389 Committed r104916: <http://trac.webkit.org/changeset/104916>
All reviewed patches have been landed. Closing bug.