Web Inspector: HeapSnapshot: speed-up calculateObjectToWindowDistance
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2012 12:48:07 +0000 (12:48 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2012 12:48:07 +0000 (12:48 +0000)
commit5614402c166cf1f1bce023166b140ff4bab5718e
tree3637d8ea834bf4c3d7d02f56861fcecfdcb65689
parent2950f6efd8ec72493459e64dc2e552b8156d852c
Web Inspector: HeapSnapshot: speed-up calculateObjectToWindowDistance
https://bugs.webkit.org/show_bug.cgi?id=86718

The idea is to switch from nodeIndex2distance array to nodeOrdinal2distance external array.
Due to nature of nodeIndex values the original array was sparsed.

Reviewed by Yury Semikhatsky.

* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshotNode.prototype.get distanceToWindow):
(WebInspector.HeapSnapshot.prototype._calculateObjectToWindowDistance):
(WebInspector.HeapSnapshot.prototype._bfs):
(WebInspector.HeapSnapshot.prototype._buildAggregates):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117437 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/HeapSnapshot.js