Title: [171813] branches/safari-600.1-branch/Source/WebInspectorUI
Revision
171813
Author
[email protected]
Date
2014-07-30 13:44:07 -0700 (Wed, 30 Jul 2014)

Log Message

Merged r171787.  <rdar://problem/17852395>

Modified Paths

Diff

Modified: branches/safari-600.1-branch/Source/WebInspectorUI/ChangeLog (171812 => 171813)


--- branches/safari-600.1-branch/Source/WebInspectorUI/ChangeLog	2014-07-30 20:40:22 UTC (rev 171812)
+++ branches/safari-600.1-branch/Source/WebInspectorUI/ChangeLog	2014-07-30 20:44:07 UTC (rev 171813)
@@ -1,5 +1,28 @@
 2014-07-30  Lucas Forschler  <[email protected]>
 
+        Merge r171787
+
+    2014-07-29  Joseph Pecoraro  <[email protected]>
+
+            Web Inspector: Only compute full ProfileNode times if needed - Legacy Profiler
+            https://bugs.webkit.org/show_bug.cgi?id=135406
+
+            Reviewed by Timothy Hatcher.
+
+            Full ProfileNode times are only used by the Legacy Profiler. The new profile
+            information in the Scripts Timelines currently never uses the pass. We should
+            avoid calculating it if we never use it.
+
+            * UserInterface/Models/ProfileNode.js:
+            (WebInspector.ProfileNode.prototype.get startTime):
+            (WebInspector.ProfileNode.prototype.get endTime):
+            (WebInspector.ProfileNode.prototype.get selfTime):
+            (WebInspector.ProfileNode.prototype.get totalTime):
+            (WebInspector.ProfileNode.prototype.establishRelationships):
+            (WebInspector.ProfileNode.prototype._computeTotalTimes):
+
+2014-07-30  Lucas Forschler  <[email protected]>
+
         Merge r171786
 
     2014-07-29  Joseph Pecoraro  <[email protected]>

Modified: branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Models/ProfileNode.js (171812 => 171813)


--- branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Models/ProfileNode.js	2014-07-30 20:40:22 UTC (rev 171812)
+++ branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Models/ProfileNode.js	2014-07-30 20:44:07 UTC (rev 171813)
@@ -45,18 +45,13 @@
     this._parentNode = null;
     this._previousSibling = null;
     this._nextSibling = null;
+    this._computedTotalTimes = false;
 
     for (var i = 0; i < this._childNodes.length; ++i)
         this._childNodes[i].establishRelationships(this, this._childNodes[i - 1], this._childNodes[i + 1]);
 
     for (var i = 0; i < this._calls.length; ++i)
         this._calls[i].establishRelationships(this, this._calls[i - 1], this._calls[i + 1]);
-
-    var info = this.computeCallInfoForTimeRange(0, Infinity);
-    this._startTime = info.startTime;
-    this._endTime = info.endTime;
-    this._selfTime = info.selfTime;
-    this._totalTime = info.totalTime;
 };
 
 WebInspector.ProfileNode.Type = {
@@ -99,21 +94,25 @@
 
     get startTime()
     {
+        this._computeTotalTimesIfNeeded();
         return this._startTime;
     },
 
     get endTime()
     {
+        this._computeTotalTimesIfNeeded();
         return this._endTime;
     },
 
     get selfTime()
     {
+        this._computeTotalTimesIfNeeded();
         return this._selfTime;
     },
 
     get totalTime()
     {
+        this._computeTotalTimesIfNeeded();
         return this._totalTime;
     },
 
@@ -216,5 +215,21 @@
         this._parentNode = parentNode || null;
         this._previousSibling = previousSibling || null;
         this._nextSibling = nextSibling || null;
+    },
+
+    // Private
+
+    _computeTotalTimes: function()
+    {
+        if (this._computedTotalTimes)
+            return;
+
+        this._computedTotalTimes = true;
+
+        var info = this.computeCallInfoForTimeRange(0, Infinity);
+        this._startTime = info.startTime;
+        this._endTime = info.endTime;
+        this._selfTime = info.selfTime;
+        this._totalTime = info.totalTime;
     }
 };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to