Bug 78113 - Web Inspector: heap snapshot: implement Distance column in Object's retaining tree.
Summary: Web Inspector: heap snapshot: implement Distance column in Object's retaining...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Ilya Tikhonovsky
URL:
Keywords:
Depends on:
Blocks: 78411
  Show dependency treegraph
 
Reported: 2012-02-08 06:41 PST by Ilya Tikhonovsky
Modified: 2012-02-11 01:26 PST (History)
10 users (show)

See Also:


Attachments
Patch (15.03 KB, patch)
2012-02-08 06:53 PST, Ilya Tikhonovsky
no flags Details | Formatted Diff | Diff
Patch (17.37 KB, patch)
2012-02-08 08:33 PST, Ilya Tikhonovsky
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Tikhonovsky 2012-02-08 06:41:08 PST
%subj%
Comment 1 Ilya Tikhonovsky 2012-02-08 06:53:51 PST
Created attachment 126076 [details]
Patch
Comment 2 Yury Semikhatsky 2012-02-08 07:10:50 PST
I'm not sure that we need to see this column in the UI. It doesn't provide much additional information about the retainers.
Comment 3 Yury Semikhatsky 2012-02-08 07:13:30 PST
Comment on attachment 126076 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=126076&action=review

> Source/WebCore/inspector/front-end/DetailedHeapshotGridNodes.js:436
> +            distanceToWindow: ["distanceToWindow", sortAscending, "_name", true]

Please make sure sorting by the distance column works if there are expanded entries. r- for this.
Comment 4 Ilya Tikhonovsky 2012-02-08 08:33:30 PST
Created attachment 126087 [details]
Patch
Comment 5 Yury Semikhatsky 2012-02-08 08:56:07 PST
Comment on attachment 126087 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=126087&action=review

> Source/WebCore/inspector/front-end/HeapSnapshot.js:946
> +        this._distancesToWindow = new Array(this.nodeCount);

Use {} instead of array?

> Source/WebCore/inspector/front-end/HeapSnapshot.js:969
> +            var node = list[index++]; // shift generates too much garbage.

Why not just use shift here?
Comment 6 Ilya Tikhonovsky 2012-02-08 10:50:16 PST
Comment on attachment 126087 [details]
Patch

Clearing flags on attachment: 126087

Committed r107106: <http://trac.webkit.org/changeset/107106>
Comment 7 Ilya Tikhonovsky 2012-02-08 10:50:26 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Mikhail Naganov 2012-02-09 01:42:59 PST
Comment on attachment 126087 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=126087&action=review

> Source/WebCore/inspector/front-end/HeapSnapshot.js:978
> +                if (typeof this._distancesToWindow[childNode.nodeIndex] !== "undefined")

Drive-by: "if (childNode.nodeIndex in this._distancesToWindow)" is shorter