Title: [201135] branches/safari-602.1.32-branch/Source/WebInspectorUI
Revision
201135
Author
[email protected]
Date
2016-05-19 01:40:03 -0700 (Thu, 19 May 2016)

Log Message

Merge r200779. rdar://problem/26239051

Modified Paths

Diff

Modified: branches/safari-602.1.32-branch/Source/WebInspectorUI/ChangeLog (201134 => 201135)


--- branches/safari-602.1.32-branch/Source/WebInspectorUI/ChangeLog	2016-05-19 08:40:00 UTC (rev 201134)
+++ branches/safari-602.1.32-branch/Source/WebInspectorUI/ChangeLog	2016-05-19 08:40:03 UTC (rev 201135)
@@ -1,5 +1,38 @@
 2016-05-19  Babak Shafiei  <[email protected]>
 
+        Merge r200779. rdar://problem/26239051
+
+    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-19  Babak Shafiei  <[email protected]>
+
         Merge r200767. rdar://problem/26231245
 
     2016-05-12  Matt Baker  <[email protected]>

Modified: branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Views/TimelineView.js (201134 => 201135)


--- branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Views/TimelineView.js	2016-05-19 08:40:00 UTC (rev 201134)
+++ branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Views/TimelineView.js	2016-05-19 08:40:03 UTC (rev 201135)
@@ -80,7 +80,7 @@
 
         this._zeroTime = x;
 
-        this.needsLayout();
+        this._timesDidChange();
     }
 
     get startTime()
@@ -97,8 +97,7 @@
 
         this._startTime = x;
 
-        this._filterTimesDidChange();
-        this.needsLayout();
+        this._timesDidChange();
     }
 
     get endTime()
@@ -115,8 +114,7 @@
 
         this._endTime = x;
 
-        this._filterTimesDidChange();
-        this.needsLayout();
+        this._timesDidChange();
     }
 
     get currentTime()
@@ -142,10 +140,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()
@@ -306,18 +302,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

Reply via email to