Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Unified Diff: third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js

Issue 2392123002: [Devtools] Use requestAnimationFrame instead of timer in network (Closed)
Patch Set: [Devtools] Use requestAnimationFrame instead of timer in network Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
index 4306de7d6973bc2e07a42243c737261a2ed27b12..8d576b0eec37e776ec93973919840d8c56c18db7 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
@@ -99,8 +99,6 @@ WebInspector.NetworkLogView._isMatchingSearchQuerySymbol = Symbol("isMatchingSea
WebInspector.NetworkLogView.HTTPSchemas = {"http": true, "https": true, "ws": true, "wss": true};
-WebInspector.NetworkLogView._defaultRefreshDelay = 200;
-
WebInspector.NetworkLogView._waterfallMinOvertime = 1;
WebInspector.NetworkLogView._waterfallMaxOvertime = 3;
@@ -462,8 +460,8 @@ WebInspector.NetworkLogView.prototype = {
this._needsRefresh = true;
- if (this.isShowing() && !this._refreshTimeout)
- this._refreshTimeout = setTimeout(this.refresh.bind(this), WebInspector.NetworkLogView._defaultRefreshDelay);
+ if (this.isShowing() && !this._refreshRequestId)
+ this._refreshRequestId = this.element.window().requestAnimationFrame(this.refresh.bind(this));
},
/**
@@ -580,9 +578,10 @@ WebInspector.NetworkLogView.prototype = {
refresh: function()
{
this._needsRefresh = false;
- if (this._refreshTimeout) {
- clearTimeout(this._refreshTimeout);
- delete this._refreshTimeout;
+
+ if (this._refreshRequestId) {
+ this.element.window().cancelAnimationFrame(this._refreshRequestId);
+ delete this._refreshRequestId;
}
this.removeAllNodeHighlights();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698