Title: [171787] trunk/Source/WebInspectorUI
- Revision
- 171787
- Author
- commit-qu...@webkit.org
- Date
- 2014-07-29 21:17:28 -0700 (Tue, 29 Jul 2014)
Log Message
Web Inspector: Only compute full ProfileNode times if needed - Legacy Profiler
https://bugs.webkit.org/show_bug.cgi?id=135406
Patch by Joseph Pecoraro <pecor...@apple.com> on 2014-07-29
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):
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (171786 => 171787)
--- trunk/Source/WebInspectorUI/ChangeLog 2014-07-30 04:00:39 UTC (rev 171786)
+++ trunk/Source/WebInspectorUI/ChangeLog 2014-07-30 04:17:28 UTC (rev 171787)
@@ -1,5 +1,24 @@
2014-07-29 Joseph Pecoraro <pecor...@apple.com>
+ 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-29 Joseph Pecoraro <pecor...@apple.com>
+
Web Inspector: Reduce forced layouts in TimelineOverview
https://bugs.webkit.org/show_bug.cgi?id=135405
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/ProfileNode.js (171786 => 171787)
--- trunk/Source/WebInspectorUI/UserInterface/Models/ProfileNode.js 2014-07-30 04:00:39 UTC (rev 171786)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/ProfileNode.js 2014-07-30 04:17:28 UTC (rev 171787)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes