Bug 87124 - Web Inspector: HeapSnapshot: speed-up calculateRetainedSize functon.
: Web Inspector: HeapSnapshot: speed-up calculateRetainedSize functon.
Status: RESOLVED FIXED
: WebKit
Web Inspector (Deprecated)
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To:
:
:
:
: 87107
  Show dependency treegraph
 
Reported: 2012-05-22 05:54 PST by
Modified: 2012-05-22 07:21 PST (History)


Attachments
Patch (11.11 KB, patch)
2012-05-22 06:11 PST, Ilya Tikhonovsky
yurys: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2012-05-22 05:54:59 PST
I found that in all dominators related functions we use nodeOrdinals.
At the moment we divide nodeIndex to nodeFieldCount and this operation too expensive for these simple algorithms.
------- Comment #1 From 2012-05-22 06:03:31 PST -------
RESULT heap-snapshot: _calculateRetainedSizes= 245 ms
RESULT heap-snapshot: _buildDominatedNodes= 33 ms

vs

RESULT heap-snapshot: _calculateRetainedSizes= 87 ms
RESULT heap-snapshot: _buildDominatedNodes= 15 ms
------- Comment #2 From 2012-05-22 06:11:54 PST -------
Created an attachment (id=143290) [details]
Patch
------- Comment #3 From 2012-05-22 06:14:50 PST -------
(From update of attachment 143290 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=143290&action=review

> Source/WebCore/inspector/front-end/HeapSnapshot.js:462
> +        return this._snapshot._dominatorsTree[this.nodeIndex / this._snapshot._nodeFieldCount] * nodeFieldCount;

this._snapshot._nodeFieldCount ->  nodeFieldCount
------- Comment #4 From 2012-05-22 06:25:10 PST -------
Committed r117962: <http://trac.webkit.org/changeset/117962>