Web Inspector: linearise aggregate's retaining size calculation.
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Apr 2012 15:49:59 +0000 (15:49 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Apr 2012 15:49:59 +0000 (15:49 +0000)
commite6656fe82bc95428a8160252ed153f61778bbcca
tree43b3683aee5b8a4bc8b505ee1cb7a77436b4abf5
parent69e9bdbd020e724a2f3470eb58d51bd3455e3102
Web Inspector: linearise aggregate's retaining size calculation.
https://bugs.webkit.org/show_bug.cgi?id=83125

This version is twice as fast as the original and it is non-recursive.

Reviewed by Yury Semikhatsky.

PerformanceTests:

* inspector/detailed-heapshots-smoke-test.html:

Source/WebCore:

* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshot.prototype._getDominatedIndex): was moved closer to it's usage
(WebInspector.HeapSnapshot.prototype._calculateClassesRetainedSize): it was _buildAggregates' inner function forDominatedNodes.
it was:
a) extracted from _buildAggregates;
b) made non-recursive;
c) many getters were inlined;
d) subarray of dominating nodes were inlined too.
(WebInspector.HeapSnapshot.prototype._buildAggregates): many getters were inlined.
(WebInspector.HeapSnapshot.prototype.aggregates):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113194 268f45cc-cd09-0410-ab3c-d52691b4dbfc
PerformanceTests/ChangeLog
PerformanceTests/inspector/detailed-heapshots-smoke-test.html
Source/WebCore/ChangeLog
Source/WebCore/inspector/front-end/HeapSnapshot.js