Title: [200779] trunk/Source/WebInspectorUI
- Revision
- 200779
- Author
- [email protected]
- Date
- 2016-05-12 10:57:32 -0700 (Thu, 12 May 2016)
Log Message
Web Inspector: 11% of time in TimelineRecording spent updating DataGrid that is not visible
https://bugs.webkit.org/show_bug.cgi?id=157612
<rdar://problem/26239051>
Reviewed by Timothy Hatcher.
During recording, a timeline view is constantly having its cached time
values updated. These updates should only trigger forced layouts if the
view supports live data.
* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.set zeroTime):
Drive-by fix, add call to _filterTimesDidChange.
(WebInspector.TimelineView.prototype.set startTime):
(WebInspector.TimelineView.prototype.set endTime):
(WebInspector.TimelineView.prototype.set currentTime):
Don't update layout directly.
(WebInspector.TimelineView.prototype._timesDidChange):
Force a layout if the view supports live data. When not recording,
a layout is always performed.
(WebInspector.TimelineView):
(WebInspector.TimelineView.prototype._filterTimesDidChange.delayedWork): Deleted.
Changed to an arrow function.
(WebInspector.TimelineView.prototype._filterTimesDidChange): Deleted.
Renamed _timesDidChange, since the method now does more than throttle
a filterDidChange call.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (200778 => 200779)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-05-12 17:53:38 UTC (rev 200778)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-05-12 17:57:32 UTC (rev 200779)
@@ -1,3 +1,32 @@
+2016-05-12 Matt Baker <[email protected]>
+
+ Web Inspector: 11% of time in TimelineRecording spent updating DataGrid that is not visible
+ https://bugs.webkit.org/show_bug.cgi?id=157612
+ <rdar://problem/26239051>
+
+ Reviewed by Timothy Hatcher.
+
+ During recording, a timeline view is constantly having its cached time
+ values updated. These updates should only trigger forced layouts if the
+ view supports live data.
+
+ * UserInterface/Views/TimelineView.js:
+ (WebInspector.TimelineView.prototype.set zeroTime):
+ Drive-by fix, add call to _filterTimesDidChange.
+ (WebInspector.TimelineView.prototype.set startTime):
+ (WebInspector.TimelineView.prototype.set endTime):
+ (WebInspector.TimelineView.prototype.set currentTime):
+ Don't update layout directly.
+ (WebInspector.TimelineView.prototype._timesDidChange):
+ Force a layout if the view supports live data. When not recording,
+ a layout is always performed.
+ (WebInspector.TimelineView):
+ (WebInspector.TimelineView.prototype._filterTimesDidChange.delayedWork): Deleted.
+ Changed to an arrow function.
+ (WebInspector.TimelineView.prototype._filterTimesDidChange): Deleted.
+ Renamed _timesDidChange, since the method now does more than throttle
+ a filterDidChange call.
+
2016-05-12 Fujii Hironori <[email protected]>
Web Inspector: Windows Perl fails to run copy-user-interface-resources.pl
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js (200778 => 200779)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js 2016-05-12 17:53:38 UTC (rev 200778)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js 2016-05-12 17:57:32 UTC (rev 200779)
@@ -85,7 +85,7 @@
this._zeroTime = x;
- this.needsLayout();
+ this._timesDidChange();
}
get startTime()
@@ -102,8 +102,7 @@
this._startTime = x;
- this._filterTimesDidChange();
- this.needsLayout();
+ this._timesDidChange();
}
get endTime()
@@ -120,8 +119,7 @@
this._endTime = x;
- this._filterTimesDidChange();
- this.needsLayout();
+ this._timesDidChange();
}
get currentTime()
@@ -147,10 +145,8 @@
return this._startTime - wiggleTime <= currentTime && currentTime <= this._endTime + wiggleTime;
}
- if (checkIfLayoutIsNeeded.call(this, oldCurrentTime) || checkIfLayoutIsNeeded.call(this, this._currentTime)) {
- this._filterTimesDidChange();
- this.needsLayout();
- }
+ if (checkIfLayoutIsNeeded.call(this, oldCurrentTime) || checkIfLayoutIsNeeded.call(this, this._currentTime))
+ this._timesDidChange();
}
get filterStartTime()
@@ -311,18 +307,18 @@
// Private
- _filterTimesDidChange()
+ _timesDidChange()
{
+ if (!WebInspector.timelineManager.isCapturing() || this.showsLiveRecordingData)
+ this.needsLayout();
+
if (!this._timelineDataGrid || this._updateFilterTimeout)
return;
- function delayedWork()
- {
+ this._updateFilterTimeout = setTimeout(() => {
this._updateFilterTimeout = undefined;
this._timelineDataGrid.filterDidChange();
- }
-
- this._updateFilterTimeout = setTimeout(delayedWork.bind(this), 0);
+ }, 0);
}
};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes