Title: [201149] branches/safari-602.1.32-branch/Source/WebInspectorUI
Diff
Modified: branches/safari-602.1.32-branch/Source/WebInspectorUI/ChangeLog (201148 => 201149)
--- branches/safari-602.1.32-branch/Source/WebInspectorUI/ChangeLog 2016-05-19 08:41:03 UTC (rev 201148)
+++ branches/safari-602.1.32-branch/Source/WebInspectorUI/ChangeLog 2016-05-19 08:41:06 UTC (rev 201149)
@@ -1,5 +1,22 @@
2016-05-19 Babak Shafiei <[email protected]>
+ Merge r200661.
+
+ 2016-05-10 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Avoid unnecessary timeout identifier churn in TimelineManager
+ https://bugs.webkit.org/show_bug.cgi?id=157535
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Controllers/TimelineManager.js:
+ (WebInspector.TimelineManager):
+ (WebInspector.TimelineManager.prototype.capturingStarted):
+ (WebInspector.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
+ Don't re-tickle if we tickled in the last 10ms.
+
+2016-05-19 Babak Shafiei <[email protected]>
+
Merge r200651. rdar://problem/26188642
2016-05-10 Joseph Pecoraro <[email protected]>
Modified: branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js (201148 => 201149)
--- branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js 2016-05-19 08:41:03 UTC (rev 201148)
+++ branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js 2016-05-19 08:41:06 UTC (rev 201149)
@@ -51,6 +51,10 @@
this._webTimelineScriptRecordsExpectingScriptProfilerEvents = null;
this._scriptProfilerRecords = null;
+ this._stopCapturingTimeout = undefined;
+ this._deadTimeTimeout = undefined;
+ this._lastDeadTimeTickle = 0;
+
this.reset();
}
@@ -219,6 +223,8 @@
this._isCapturing = true;
+ this._lastDeadTimeTickle = 0;
+
if (startTime)
this.activeRecording.initializeTimeBoundsIfNecessary(startTime);
@@ -730,6 +736,12 @@
if (!this._isCapturing || !this._mainResourceForAutoCapturing)
return;
+ // Avoid unnecessary churning of timeout identifier by not tickling until 10ms have passed.
+ let now = Date.now();
+ if (now <= this._lastDeadTimeTickle)
+ return;
+ this._lastDeadTimeTickle = now + 10;
+
if (this._deadTimeTimeout)
clearTimeout(this._deadTimeTimeout);
this._deadTimeTimeout = setTimeout(this._boundStopCapturing, WebInspector.TimelineManager.DeadTimeRequiredToStopAutoRecordingEarly);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes