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

Unified Diff: third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js

Issue 2820253002: DevTools: avoid slowdown from unnecessary DOM, style mutations on CodeMirrorTextEditor (Closed)
Patch Set: Created 3 years, 8 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/source_frame/UISourceCodeFrame.js
diff --git a/third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js b/third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js
index 6e013ce940864d0072e5d656289fc7d6db19f0cd..b4233756341115d8e4332e2cbeddd42894af47cb 100644
--- a/third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js
+++ b/third_party/WebKit/Source/devtools/front_end/source_frame/UISourceCodeFrame.js
@@ -575,6 +575,7 @@ SourceFrame.UISourceCodeFrame.RowMessageBucket = class {
this._messages = [];
this._level = null;
+ this._throttler = new Common.Throttler(50);
}
/**
@@ -637,7 +638,10 @@ SourceFrame.UISourceCodeFrame.RowMessageBucket = class {
var rowMessage = new SourceFrame.UISourceCodeFrame.RowMessage(message);
this._messages.push(rowMessage);
- this._updateDecoration();
+ this._throttler.schedule(() => {
+ this._updateDecoration();
+ return Promise.resolve();
+ });
}
/**
@@ -651,7 +655,10 @@ SourceFrame.UISourceCodeFrame.RowMessageBucket = class {
rowMessage.setRepeatCount(rowMessage.repeatCount() - 1);
if (!rowMessage.repeatCount())
this._messages.splice(i, 1);
- this._updateDecoration();
+ this._throttler.schedule(() => {
+ this._updateDecoration();
+ return Promise.resolve();
+ });
return;
}
}
« 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