the phase takes more than 4 secs on gmail.com
Created attachment 133023 [details] Patch
Comment on attachment 133023 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=133023&action=review looks good with nits > Source/WebCore/inspector/front-end/HeapSnapshot.js:969 > + if (!this._nodeIndex) > + this._buildNodeIndex(); unnecessary check > Source/WebCore/inspector/front-end/HeapSnapshot.js:976 > + var indexArray = this["_retainerIndex"] = new Int32Array(this._nodeIndex.length); nodeCount > Source/WebCore/inspector/front-end/HeapSnapshot.js:979 > + var nodeCount = this.nodeCount; move it 4 lines up > Source/WebCore/inspector/front-end/HeapSnapshot.js:998 > + for (i = 0, l = indexArray.length; i < l; ++i) nodeCount > Source/WebCore/inspector/front-end/HeapSnapshot.js:1004 > + for (i = 0, l = indexArray.length; i < l; ++i) { ditto
Created attachment 133041 [details] Patch
Comment on attachment 133023 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=133023&action=review >> Source/WebCore/inspector/front-end/HeapSnapshot.js:976 >> + var indexArray = this["_retainerIndex"] = new Int32Array(this._nodeIndex.length); > > nodeCount Please use this._retainerIndex syntax >> Source/WebCore/inspector/front-end/HeapSnapshot.js:979 >> + var nodeCount = this.nodeCount; > > move it 4 lines up Remember that this._nodeIndex.length !== nodeCount :) > Source/WebCore/inspector/front-end/HeapSnapshot.js:999 > + backRefsCount += indexArray[i]; backRefsCount === total edges count so you can calculate this in the previous loop and avoid additional pass through all elements. > Source/WebCore/inspector/front-end/HeapSnapshot.js:1017 > + var retNode = nodePositions[nodes[j * edgeFieldsCount + edgesOffset + edgeToNodeOffset]]; j * edgeFieldsCount + edgesOffset + edgeToNodeOffset -> edgeIndex + edgeToNodeOffset
I would like to see a test with this.
Created attachment 133080 [details] Patch
Comment on attachment 133080 [details] Patch Rejecting attachment 133080 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: /mnt/git/webkit-commit-queue/ Parsed 2 diffs from patch file(s). patching file Source/WebCore/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file Source/WebCore/inspector/front-end/HeapSnapshot.js Hunk #1 FAILED at 965. 1 out of 1 hunk FAILED -- saving rejects to file Source/WebCore/inspector/front-end/HeapSnapshot.js.rej Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force', u'--reviewer', u'Yury Semik..." exit_code: 1 cwd: /mnt/git/webkit-commit-queue/ Full output: http://queues.webkit.org/results/12071554
Created attachment 133249 [details] Patch
Comment on attachment 133249 [details] Patch Clearing flags on attachment: 133249 Committed r111688: <http://trac.webkit.org/changeset/111688>
All reviewed patches have been landed. Closing bug.
Reopening to attach new patch.
Created attachment 133804 [details] Patch
Comment on attachment 133804 [details] Patch Clearing flags on attachment: 133804 Committed r112090: <http://trac.webkit.org/changeset/112090>