|
|
Chromium Code Reviews|
Created:
4 years, 7 months ago by Jonathan Garbee Modified:
4 years ago Reviewers:
abiramithanupillai, Sami CC:
chromium-reviews, scheduler-bugs_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionImprove console message about deferring long-running timers.
BUG=574343
Committed: https://crrev.com/097f2cb6d4af73a27d0456a97bf5053f7f7db913
Cr-Commit-Position: refs/heads/master@{#395341}
Patch Set 1 #Patch Set 2 : Add reviewer #
Total comments: 1
Patch Set 3 : Fix the wording and linkage as discussed. #Patch Set 4 : Make DGC link line shorter. #Patch Set 5 : Chrome > Blink #Messages
Total messages: 23 (5 generated)
Description was changed from ========== Improve console message about deferring long-running timers. BUG= ========== to ========== Improve console message about deferring long-running timers. BUG=574343 ==========
jonathan.garbee@chromium.org changed reviewers: + skyostil@chromium.org
Attempting to improve the console warning on timer tasks. It has been causing a bit of confusion as developers see it. 1. Slightly tweaked wording to make it understandable. Please verify the message still conveys what is intended. 2. Updated the crbug link to first be an actual link. Then it will also go directly to comment #40 in the issue which includes the information to help developers diagnose the issue. PTAL
Thanks for the patch. https://codereview.chromium.org/1997413002/diff/20001/components/scheduler/re... File components/scheduler/renderer/renderer_scheduler_impl.cc (right): https://codereview.chromium.org/1997413002/diff/20001/components/scheduler/re... components/scheduler/renderer/renderer_scheduler_impl.cc:1318: "Defer long-running timer task(s) to improve scrolling smoothness. " What the message is trying to communicate is that the *browser* deferred some tasks in favor of making scrolling smoother. The guidance for the web developer should basically be: make sure your timer tasks take less than 50ms to run. (The limit is about 6ms during user gestures, but I think we might want to avoid printing the warning in that case since it is pretty spammy right now).
On 2016/05/23 at 13:16:37, skyostil wrote: > Thanks for the patch. > > https://codereview.chromium.org/1997413002/diff/20001/components/scheduler/re... > File components/scheduler/renderer/renderer_scheduler_impl.cc (right): > > https://codereview.chromium.org/1997413002/diff/20001/components/scheduler/re... > components/scheduler/renderer/renderer_scheduler_impl.cc:1318: "Defer long-running timer task(s) to improve scrolling smoothness. " > What the message is trying to communicate is that the *browser* deferred some tasks in favor of making scrolling smoother. The guidance for the web developer should basically be: make sure your timer tasks take less than 50ms to run. (The limit is about 6ms during user gestures, but I think we might want to avoid printing the warning in that case since it is pretty spammy right now). Ooh, that means my wording is way off. However, an improvement over the current could be... "Chrome deferred a task in order to make scrolling smoother. Your timer tasks should take less than 50ms to run to avoid this. Please see https://developer.mozilla.org/en-US/Add-ons/Code_snippets/Timers and https://crbug.com/574343#c40 for more information." I hate throwing a full MDN link in though, it is quite large. However, as a console warning I don't see that as a big issue. The primary focus here is to let developers understand the intent of the message and to get a good view of how to fix it. "Timer tasks" is quasi-vague terminology unless people are *really* into JS, so the MDN link can help offset that by letting them know exactly what type of functions to look at when they are profiling and analyzing. Does that sound good?
On 2016/05/23 15:05:21, Jonathan Garbee wrote: > On 2016/05/23 at 13:16:37, skyostil wrote: > > Thanks for the patch. > > > > > https://codereview.chromium.org/1997413002/diff/20001/components/scheduler/re... > > File components/scheduler/renderer/renderer_scheduler_impl.cc (right): > > > > > https://codereview.chromium.org/1997413002/diff/20001/components/scheduler/re... > > components/scheduler/renderer/renderer_scheduler_impl.cc:1318: "Defer > long-running timer task(s) to improve scrolling smoothness. " > > What the message is trying to communicate is that the *browser* deferred some > tasks in favor of making scrolling smoother. The guidance for the web developer > should basically be: make sure your timer tasks take less than 50ms to run. (The > limit is about 6ms during user gestures, but I think we might want to avoid > printing the warning in that case since it is pretty spammy right now). > > Ooh, that means my wording is way off. However, an improvement over the current > could be... > > "Chrome deferred a task in order to make scrolling smoother. Your timer tasks > should take less than 50ms to run to avoid this. Please see > https://developer.mozilla.org/en-US/Add-ons/Code_snippets/Timers and > https://crbug.com/574343#c40 for more information." > > I hate throwing a full MDN link in though, it is quite large. However, as a > console warning I don't see that as a big issue. The primary focus here is to > let developers understand the intent of the message and to get a good view of > how to fix it. "Timer tasks" is quasi-vague terminology unless people are > *really* into JS, so the MDN link can help offset that by letting them know > exactly what type of functions to look at when they are profiling and analyzing. > > Does that sound good? That's definitely an improvement. How about linking here instead of MDN to give a little more guidance? https://developers.google.com/web/tools/chrome-devtools/profile/evaluate-perf... I think I'll put together another patch which disables alerting for shorter tasks.
On 2016/05/23 at 15:25:38, skyostil wrote: > On 2016/05/23 15:05:21, Jonathan Garbee wrote: > > On 2016/05/23 at 13:16:37, skyostil wrote: > > > Thanks for the patch. > > > > > > > > https://codereview.chromium.org/1997413002/diff/20001/components/scheduler/re... > > > File components/scheduler/renderer/renderer_scheduler_impl.cc (right): > > > > > > > > https://codereview.chromium.org/1997413002/diff/20001/components/scheduler/re... > > > components/scheduler/renderer/renderer_scheduler_impl.cc:1318: "Defer > > long-running timer task(s) to improve scrolling smoothness. " > > > What the message is trying to communicate is that the *browser* deferred some > > tasks in favor of making scrolling smoother. The guidance for the web developer > > should basically be: make sure your timer tasks take less than 50ms to run. (The > > limit is about 6ms during user gestures, but I think we might want to avoid > > printing the warning in that case since it is pretty spammy right now). > > > > Ooh, that means my wording is way off. However, an improvement over the current > > could be... > > > > "Chrome deferred a task in order to make scrolling smoother. Your timer tasks > > should take less than 50ms to run to avoid this. Please see > > https://developer.mozilla.org/en-US/Add-ons/Code_snippets/Timers and > > https://crbug.com/574343#c40 for more information." > > > > I hate throwing a full MDN link in though, it is quite large. However, as a > > console warning I don't see that as a big issue. The primary focus here is to > > let developers understand the intent of the message and to get a good view of > > how to fix it. "Timer tasks" is quasi-vague terminology unless people are > > *really* into JS, so the MDN link can help offset that by letting them know > > exactly what type of functions to look at when they are profiling and analyzing. > > > > Does that sound good? > > That's definitely an improvement. How about linking here instead of MDN to give a little more guidance? > > https://developers.google.com/web/tools/chrome-devtools/profile/evaluate-perf... > > I think I'll put together another patch which disables alerting for shorter tasks. Can the shorter task alert simply be throttled? Say to only go off once within a minute? Probably too much, but worth asking. Patch is updated as well now. The DGC link makes the line go to 99 columns. I'd prefer we not split this up simply in case anyone is grepping for it to be able to find it as a whole easily. Is that fine within the code style or should I break out the end around 80 columns onto its own line with no space?
On 2016/05/23 at 15:40:51, Jonathan Garbee wrote: > On 2016/05/23 at 15:25:38, skyostil wrote: > > On 2016/05/23 15:05:21, Jonathan Garbee wrote: > > > On 2016/05/23 at 13:16:37, skyostil wrote: > > > > Thanks for the patch. > > > > > > > > > > > https://codereview.chromium.org/1997413002/diff/20001/components/scheduler/re... > > > > File components/scheduler/renderer/renderer_scheduler_impl.cc (right): > > > > > > > > > > > https://codereview.chromium.org/1997413002/diff/20001/components/scheduler/re... > > > > components/scheduler/renderer/renderer_scheduler_impl.cc:1318: "Defer > > > long-running timer task(s) to improve scrolling smoothness. " > > > > What the message is trying to communicate is that the *browser* deferred some > > > tasks in favor of making scrolling smoother. The guidance for the web developer > > > should basically be: make sure your timer tasks take less than 50ms to run. (The > > > limit is about 6ms during user gestures, but I think we might want to avoid > > > printing the warning in that case since it is pretty spammy right now). > > > > > > Ooh, that means my wording is way off. However, an improvement over the current > > > could be... > > > > > > "Chrome deferred a task in order to make scrolling smoother. Your timer tasks > > > should take less than 50ms to run to avoid this. Please see > > > https://developer.mozilla.org/en-US/Add-ons/Code_snippets/Timers and > > > https://crbug.com/574343#c40 for more information." > > > > > > I hate throwing a full MDN link in though, it is quite large. However, as a > > > console warning I don't see that as a big issue. The primary focus here is to > > > let developers understand the intent of the message and to get a good view of > > > how to fix it. "Timer tasks" is quasi-vague terminology unless people are > > > *really* into JS, so the MDN link can help offset that by letting them know > > > exactly what type of functions to look at when they are profiling and analyzing. > > > > > > Does that sound good? > > > > That's definitely an improvement. How about linking here instead of MDN to give a little more guidance? > > > > https://developers.google.com/web/tools/chrome-devtools/profile/evaluate-perf... > > > > I think I'll put together another patch which disables alerting for shorter tasks. > > Can the shorter task alert simply be throttled? Say to only go off once within a minute? Probably too much, but worth asking. > > Patch is updated as well now. The DGC link makes the line go to 99 columns. I'd prefer we not split this up simply in case anyone is grepping for it to be able to find it as a whole easily. Is that fine within the code style or should I break out the end around 80 columns onto its own line with no space? Although... Just thought as well on wording. Should we say "Blink" instead of "Chrome"? Since if the warning goes off in Opera it would be weird seeing "Chrome deferred..." since you aren't running Chrome itself. Along with any other browsers built on top of the engine.
On 2016/05/23 15:40:51, Jonathan Garbee wrote: > On 2016/05/23 at 15:25:38, skyostil wrote: > > On 2016/05/23 15:05:21, Jonathan Garbee wrote: > > > On 2016/05/23 at 13:16:37, skyostil wrote: > > > > Thanks for the patch. > > > > > > > > > > > > https://codereview.chromium.org/1997413002/diff/20001/components/scheduler/re... > > > > File components/scheduler/renderer/renderer_scheduler_impl.cc (right): > > > > > > > > > > > > https://codereview.chromium.org/1997413002/diff/20001/components/scheduler/re... > > > > components/scheduler/renderer/renderer_scheduler_impl.cc:1318: "Defer > > > long-running timer task(s) to improve scrolling smoothness. " > > > > What the message is trying to communicate is that the *browser* deferred > some > > > tasks in favor of making scrolling smoother. The guidance for the web > developer > > > should basically be: make sure your timer tasks take less than 50ms to run. > (The > > > limit is about 6ms during user gestures, but I think we might want to avoid > > > printing the warning in that case since it is pretty spammy right now). > > > > > > Ooh, that means my wording is way off. However, an improvement over the > current > > > could be... > > > > > > "Chrome deferred a task in order to make scrolling smoother. Your timer > tasks > > > should take less than 50ms to run to avoid this. Please see > > > https://developer.mozilla.org/en-US/Add-ons/Code_snippets/Timers and > > > https://crbug.com/574343#c40 for more information." > > > > > > I hate throwing a full MDN link in though, it is quite large. However, as a > > > console warning I don't see that as a big issue. The primary focus here is > to > > > let developers understand the intent of the message and to get a good view > of > > > how to fix it. "Timer tasks" is quasi-vague terminology unless people are > > > *really* into JS, so the MDN link can help offset that by letting them know > > > exactly what type of functions to look at when they are profiling and > analyzing. > > > > > > Does that sound good? > > > > That's definitely an improvement. How about linking here instead of MDN to > give a little more guidance? > > > > > https://developers.google.com/web/tools/chrome-devtools/profile/evaluate-perf... > > > > I think I'll put together another patch which disables alerting for shorter > tasks. > > Can the shorter task alert simply be throttled? Say to only go off once within a > minute? Probably too much, but worth asking. Right we only fire one alert per navigation, which should already limit things quite a bit. The reason why I wanted to remove the shorter alert completely was that we'd need to make the message dynamic (threshold is generally <10ms depending on device speed) and whenever we'd use the lower limit, the deferred task is going to run very soon anyway (e.g., after the user gesture ends). > Patch is updated as well now. The DGC link makes the line go to 99 columns. I'd > prefer we not split this up simply in case anyone is grepping for it to be able > to find it as a whole easily. Is that fine within the code style or should I > break out the end around 80 columns onto its own line with no space? I think it's fine to keep the longer line for greppability. lgtm.
On 2016/05/23 15:45:22, Jonathan Garbee wrote: > On 2016/05/23 at 15:40:51, Jonathan Garbee wrote: > > On 2016/05/23 at 15:25:38, skyostil wrote: > > > On 2016/05/23 15:05:21, Jonathan Garbee wrote: > > > > On 2016/05/23 at 13:16:37, skyostil wrote: > > > > > Thanks for the patch. > > > > > > > > > > > > > > > https://codereview.chromium.org/1997413002/diff/20001/components/scheduler/re... > > > > > File components/scheduler/renderer/renderer_scheduler_impl.cc (right): > > > > > > > > > > > > > > > https://codereview.chromium.org/1997413002/diff/20001/components/scheduler/re... > > > > > components/scheduler/renderer/renderer_scheduler_impl.cc:1318: "Defer > > > > long-running timer task(s) to improve scrolling smoothness. " > > > > > What the message is trying to communicate is that the *browser* deferred > some > > > > tasks in favor of making scrolling smoother. The guidance for the web > developer > > > > should basically be: make sure your timer tasks take less than 50ms to > run. (The > > > > limit is about 6ms during user gestures, but I think we might want to > avoid > > > > printing the warning in that case since it is pretty spammy right now). > > > > > > > > Ooh, that means my wording is way off. However, an improvement over the > current > > > > could be... > > > > > > > > "Chrome deferred a task in order to make scrolling smoother. Your timer > tasks > > > > should take less than 50ms to run to avoid this. Please see > > > > https://developer.mozilla.org/en-US/Add-ons/Code_snippets/Timers and > > > > https://crbug.com/574343#c40 for more information." > > > > > > > > I hate throwing a full MDN link in though, it is quite large. However, as > a > > > > console warning I don't see that as a big issue. The primary focus here is > to > > > > let developers understand the intent of the message and to get a good view > of > > > > how to fix it. "Timer tasks" is quasi-vague terminology unless people are > > > > *really* into JS, so the MDN link can help offset that by letting them > know > > > > exactly what type of functions to look at when they are profiling and > analyzing. > > > > > > > > Does that sound good? > > > > > > That's definitely an improvement. How about linking here instead of MDN to > give a little more guidance? > > > > > > > https://developers.google.com/web/tools/chrome-devtools/profile/evaluate-perf... > > > > > > I think I'll put together another patch which disables alerting for shorter > tasks. > > > > Can the shorter task alert simply be throttled? Say to only go off once within > a minute? Probably too much, but worth asking. > > > > Patch is updated as well now. The DGC link makes the line go to 99 columns. > I'd prefer we not split this up simply in case anyone is grepping for it to be > able to find it as a whole easily. Is that fine within the code style or should > I break out the end around 80 columns onto its own line with no space? > > Although... Just thought as well on wording. Should we say "Blink" instead of > "Chrome"? Since if the warning goes off in Opera it would be weird seeing > "Chrome deferred..." since you aren't running Chrome itself. Along with any > other browsers built on top of the engine. Good point, Blink is probably more appropriate.
On 2016/05/23 at 15:48:52, skyostil wrote: > On 2016/05/23 15:45:22, Jonathan Garbee wrote: > > On 2016/05/23 at 15:40:51, Jonathan Garbee wrote: > > > On 2016/05/23 at 15:25:38, skyostil wrote: > > > > On 2016/05/23 15:05:21, Jonathan Garbee wrote: > > > > > On 2016/05/23 at 13:16:37, skyostil wrote: > > > > > > Thanks for the patch. > > > > > > > > > > > > > > > > > > > https://codereview.chromium.org/1997413002/diff/20001/components/scheduler/re... > > > > > > File components/scheduler/renderer/renderer_scheduler_impl.cc (right): > > > > > > > > > > > > > > > > > > > https://codereview.chromium.org/1997413002/diff/20001/components/scheduler/re... > > > > > > components/scheduler/renderer/renderer_scheduler_impl.cc:1318: "Defer > > > > > long-running timer task(s) to improve scrolling smoothness. " > > > > > > What the message is trying to communicate is that the *browser* deferred > > some > > > > > tasks in favor of making scrolling smoother. The guidance for the web > > developer > > > > > should basically be: make sure your timer tasks take less than 50ms to > > run. (The > > > > > limit is about 6ms during user gestures, but I think we might want to > > avoid > > > > > printing the warning in that case since it is pretty spammy right now). > > > > > > > > > > Ooh, that means my wording is way off. However, an improvement over the > > current > > > > > could be... > > > > > > > > > > "Chrome deferred a task in order to make scrolling smoother. Your timer > > tasks > > > > > should take less than 50ms to run to avoid this. Please see > > > > > https://developer.mozilla.org/en-US/Add-ons/Code_snippets/Timers and > > > > > https://crbug.com/574343#c40 for more information." > > > > > > > > > > I hate throwing a full MDN link in though, it is quite large. However, as > > a > > > > > console warning I don't see that as a big issue. The primary focus here is > > to > > > > > let developers understand the intent of the message and to get a good view > > of > > > > > how to fix it. "Timer tasks" is quasi-vague terminology unless people are > > > > > *really* into JS, so the MDN link can help offset that by letting them > > know > > > > > exactly what type of functions to look at when they are profiling and > > analyzing. > > > > > > > > > > Does that sound good? > > > > > > > > That's definitely an improvement. How about linking here instead of MDN to > > give a little more guidance? > > > > > > > > > > https://developers.google.com/web/tools/chrome-devtools/profile/evaluate-perf... > > > > > > > > I think I'll put together another patch which disables alerting for shorter > > tasks. > > > > > > Can the shorter task alert simply be throttled? Say to only go off once within > > a minute? Probably too much, but worth asking. > > > > > > Patch is updated as well now. The DGC link makes the line go to 99 columns. > > I'd prefer we not split this up simply in case anyone is grepping for it to be > > able to find it as a whole easily. Is that fine within the code style or should > > I break out the end around 80 columns onto its own line with no space? > > > > Although... Just thought as well on wording. Should we say "Blink" instead of > > "Chrome"? Since if the warning goes off in Opera it would be weird seeing > > "Chrome deferred..." since you aren't running Chrome itself. Along with any > > other browsers built on top of the engine. > > Good point, Blink is probably more appropriate. Updated to Blink and publishing. Let's hope this lands for the M52 branch... :D Thank you!
The CQ bit was checked by jonathan.garbee@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from skyostil@chromium.org Link to the patchset: https://codereview.chromium.org/1997413002/#ps80001 (title: "Chrome > Blink")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1997413002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1997413002/80001
On 2016/05/23 15:51:22, Jonathan Garbee wrote: > Updated to Blink and publishing. Let's hope this lands for the M52 branch... :D M52 already branched, but we can always backport this.
On 2016/05/23 at 15:54:17, skyostil wrote: > On 2016/05/23 15:51:22, Jonathan Garbee wrote: > > Updated to Blink and publishing. Let's hope this lands for the M52 branch... :D > > M52 already branched, but we can always backport this. Once it lands safely let's look into that (I've never gone through that process before.) I've had to explain this message a few times in the past week so people are noticing it now and asking what it is. I'd like us to get the updated message out ASAP so it is more useful.
On 2016/05/23 15:56:03, Jonathan Garbee wrote: > Once it lands safely let's look into that (I've never gone through that process > before.) I've had to explain this message a few times in the past week so people > are noticing it now and asking what it is. I'd like us to get the updated > message out ASAP so it is more useful. Sure thing. By the way, if you've seen cases where the warning has actually been useful (e.g., the page broke because a task was deferred), I'd love to hear about it. So far the warning has mainly been extra noise as far as I can tell.
On 2016/05/23 at 16:00:34, skyostil wrote: > On 2016/05/23 15:56:03, Jonathan Garbee wrote: > > Once it lands safely let's look into that (I've never gone through that process > > before.) I've had to explain this message a few times in the past week so people > > are noticing it now and asking what it is. I'd like us to get the updated > > message out ASAP so it is more useful. > > Sure thing. By the way, if you've seen cases where the warning has actually been useful (e.g., the page broke because a task was deferred), I'd love to hear about it. So far the warning has mainly been extra noise as far as I can tell. I'll let you know if I hear anything. Typically I help people figure out how to use the DevTools to find their problem then I don't hear back. :/ I just hope I helped them enough to get by. So far no "breakage" either, just developers confused to what the warning is and why it happens. IMO this "noise" is acceptable. While it would be better to only do it when running a Timeline record; the time at which the record is occurring may not concur with this problem. Therefore leaving developers unaware that it occurs. I am going to try and discuss with DevRel guys and DevTools a better way to handle these cases. Right now a console warning is fairly limited and crbug links alone can be arcane. I'd like to have some simple place to input problem, debug steps, and the expected solution that is easily linkable to a given topic. Probably should fit under DGC/web somewhere ideally as you pointed out with the RAIL intro recommendation for the link on this one. We are looking into more instructional guides for debugging, so maybe doing a guide on this and linking to that specifically would be a benefit.
Message was sent while issue was closed.
Committed patchset #5 (id:80001)
Message was sent while issue was closed.
Description was changed from ========== Improve console message about deferring long-running timers. BUG=574343 ========== to ========== Improve console message about deferring long-running timers. BUG=574343 Committed: https://crrev.com/097f2cb6d4af73a27d0456a97bf5053f7f7db913 Cr-Commit-Position: refs/heads/master@{#395341} ==========
Message was sent while issue was closed.
Patchset 5 (id:??) landed as https://crrev.com/097f2cb6d4af73a27d0456a97bf5053f7f7db913 Cr-Commit-Position: refs/heads/master@{#395341}
Message was sent while issue was closed.
Hi all, I have created SAP UI5 application with swipe feature implemented.. *but when we i am debugging android devices i am getting the following warning.. after that swipe feature stopped working.. What should i do to make that feature working* *Blink deferred a task in order to make scrolling smoother. 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-perf... and https://crbug.com/574343#c40 for more information.* On Monday, May 23, 2016 at 10:16:02 PM UTC+5:30, commit-bot@chromium.org via codereview.chromium.org wrote: > > Patchset 5 (id:??) landed as > https://crrev.com/097f2cb6d4af73a27d0456a97bf5053f7f7db913 > Cr-Commit-Position: refs/heads/master@{#395341} > > https://codereview.chromium.org/1997413002/ >
Message was sent while issue was closed.
Hi all, I have created SAP UI5 application with swipe feature implemented.. *but when we i am debugging android devices i am getting the following warning.. after that swipe feature stopped working.. What should i do to make that feature working* *Blink deferred a task in order to make scrolling smoother. 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-perf... and https://crbug.com/574343#c40 for more information.* On Monday, May 23, 2016 at 10:16:02 PM UTC+5:30, commit-bot@chromium.org via codereview.chromium.org wrote: > > Patchset 5 (id:??) landed as > https://crrev.com/097f2cb6d4af73a27d0456a97bf5053f7f7db913 > Cr-Commit-Position: refs/heads/master@{#395341} > > https://codereview.chromium.org/1997413002/ > -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org. |
