Title: [112225] trunk/Source/WebCore
- Revision
- 112225
- Author
- loi...@chromium.org
- Date
- 2012-03-27 01:34:19 -0700 (Tue, 27 Mar 2012)
Log Message
Web Inspector: HeapSnapshot: speed-up distanceToWindow calculation.
https://bugs.webkit.org/show_bug.cgi?id=82305
Reviewed by Yury Semikhatsky.
* inspector/front-end/HeapSnapshot.js:
(WebInspector.HeapSnapshot.prototype._bfs):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (112224 => 112225)
--- trunk/Source/WebCore/ChangeLog 2012-03-27 08:30:45 UTC (rev 112224)
+++ trunk/Source/WebCore/ChangeLog 2012-03-27 08:34:19 UTC (rev 112225)
@@ -1,3 +1,13 @@
+2012-03-27 Ilya Tikhonovsky <loi...@chromium.org>
+
+ Web Inspector: HeapSnapshot: speed-up distanceToWindow calculation.
+ https://bugs.webkit.org/show_bug.cgi?id=82305
+
+ Reviewed by Yury Semikhatsky.
+
+ * inspector/front-end/HeapSnapshot.js:
+ (WebInspector.HeapSnapshot.prototype._bfs):
+
2012-03-27 Nikolas Zimmermann <nzimmerm...@rim.com>
SVGAnimatedType should support SVGAnimatedIntegerOptionalInteger animation
Modified: trunk/Source/WebCore/inspector/front-end/HeapSnapshot.js (112224 => 112225)
--- trunk/Source/WebCore/inspector/front-end/HeapSnapshot.js 2012-03-27 08:30:45 UTC (rev 112224)
+++ trunk/Source/WebCore/inspector/front-end/HeapSnapshot.js 2012-03-27 08:34:19 UTC (rev 112225)
@@ -1148,7 +1148,7 @@
_bfs: function(list)
{
var index = 0;
- var node = this.rootNode;
+ var nodes = this._nodes;
while (index < list.length) {
var nodeIndex = list[index++]; // shift generates too much garbage.
if (index > 100000) {
@@ -1156,9 +1156,11 @@
index = 0;
}
var distance = this._distancesToWindow[nodeIndex] + 1;
- node.nodeIndex = nodeIndex;
- for (var iter = node.edges; iter.hasNext(); iter.next()) {
- var childNodeIndex = iter.edge.nodeIndex;
+ var edgesCount = nodes[nodeIndex + this._edgesCountOffset];
+ var edgeToNodeIndex = nodeIndex + this._firstEdgeOffset + this._edgeToNodeOffset;
+ for (var i = 0; i < edgesCount; ++i) {
+ var childNodeIndex = nodes[edgeToNodeIndex];
+ edgeToNodeIndex += this._edgeFieldsCount;
if (childNodeIndex in this._distancesToWindow)
continue;
this._distancesToWindow[childNodeIndex] = distance;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes