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

Unified Diff: components/scheduler/renderer/renderer_scheduler_impl.cc

Issue 2016943003: scheduler: Avoid false alerts about expensive task blocking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | components/scheduler/renderer/renderer_scheduler_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/renderer/renderer_scheduler_impl.cc
diff --git a/components/scheduler/renderer/renderer_scheduler_impl.cc b/components/scheduler/renderer/renderer_scheduler_impl.cc
index 5add212d251922ed56c12f00ebc0a7a214e913e9..9936a69f9fa5b9489f626e9bc478d8b8048f80a0 100644
--- a/components/scheduler/renderer/renderer_scheduler_impl.cc
+++ b/components/scheduler/renderer/renderer_scheduler_impl.cc
@@ -1294,10 +1294,17 @@ void RendererSchedulerImpl::OnTriedToExecuteBlockedTask(
const TaskQueue& queue,
const base::PendingTask& task) {
if (!MainThreadOnly().expensive_task_blocking_allowed ||
+ MainThreadOnly().current_use_case == UseCase::TOUCHSTART ||
+ MainThreadOnly().longest_jank_free_task_duration <
+ base::TimeDelta::FromMilliseconds(kRailsResponseTimeMillis) ||
MainThreadOnly().timer_queue_suspend_count ||
MainThreadOnly().timer_queue_suspended_when_backgrounded) {
return;
}
+ if (!MainThreadOnly().timer_tasks_seem_expensive &&
+ !MainThreadOnly().loading_tasks_seem_expensive) {
+ return;
+ }
if (!MainThreadOnly().have_reported_blocking_intervention_in_current_policy) {
MainThreadOnly().have_reported_blocking_intervention_in_current_policy =
true;
@@ -1316,8 +1323,8 @@ void RendererSchedulerImpl::OnTriedToExecuteBlockedTask(
true;
BroadcastConsoleWarning(
"Blink deferred a task in order to make scrolling smoother. "
- "Your timer tasks should take less than 50ms to run to avoid this. "
- "Please see "
+ "Your timer and network tasks should take less than 50ms to run "
+ "to avoid this. Please see "
"https://developers.google.com/web/tools/chrome-devtools/profile/evaluate-performance/rail"
" and https://crbug.com/574343#c40 for more information.");
}
« no previous file with comments | « no previous file | components/scheduler/renderer/renderer_scheduler_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698