Slow main thread causes long mouse wheel event queues
Reported by
blademi...@gmail.com,
Jan 30 2017
|
|||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.2996.0 Safari/537.36 Example URL: https://smotret-anime.ru/moments Steps to reproduce the problem: 1. Go to https://smotret-anime.ru/moments 2. Try scrolling, it will be slower than in other browsers(especially slower than in MS Edge & Firefox Nightly). 3. After scrolling 10~15 pages it will became EXTRA-slow, in other browsers(not based on Chromium) I didn't able to reproduce the EXTRA-slow behaviour. What is the expected behavior? Smoothly scrool the page, and no lags. What went wrong? Page scrolling slow, and it becomes slower with every next page scrolled. Does it occur on multiple sites: N/A Is it a problem with a plugin? No Did this work before? No Does this work in other browsers? Yes Chrome version: 58.0.2996.0 Channel: canary OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version: Shockwave Flash 24.0 r0 --Info-- In Firefox 49 and lower this website too slow, but in latest and Nightly it is very smooth. In MS Edge everything is EXTREMLY smooth, dunno why this is :/ but it is so. In any Chromium-based(even Chrome Canary) this issue persists. I think that the chromium engine itself can't handle pages with a lot of big content(images, animations etc.) because I can reproduce this issue on any other page with auto next page loading, and also with extension - [AutoPathWork] which makes almost all websites autoload next page. So after ~10 pages loaded I see significally decreased speed of scrolling, and every next page loading is freezing browser for 1~2+ sec. --System-- CPU: AMD Athlon X2 7550 2x2.5Ghz RAM: 1+2 DDR2-800Mhz 5-5-5-18 OS: Win-7x64.7601+Updates & Win-10x64.1607-AnniversayUpdate --Other example-- Example with [AutoPathWork]: 1. Install [AutoPathWork] or [Autopagerize] 2. Go to for example http://konachan.net/post 3. Scroll until reach slowdown.
,
Jan 30 2017
,
Feb 9 2017
Tested on windows 7 using chrome latest canary M58 #58.0.3006.0 and latest firefox .. didn't find any difference while scrolling . Attached screencast for reference. @blademight-- Could you please check if any flags are enabled and also try with a fresh chrome profile without any extensions and write us back with your observations , also help us by providing the screencast of the issue if it still exists. Thanks!
,
Feb 9 2017
@hdodda I forget to say about using full screen, your screencast not using full screen and only 10 pages listed, also I sure you have a better than my CPU 2x2.5GHz, but for me issue is only for chromium-based browser, after ~14-20 page it becomes slow, fps significally drops when scrolling and scrolling becomes not smooth, but in Firefox(Nightly 54) even 50+ pages does nothing to fps and scrolling still very smooth. I created screencast with fresh install of Chrome Canary(I could not attach it here due to 10MB limit): http://sendvid.com/pgo88tig As you can see in for me scrolling in Chrome not so smooth as in your screencast :( I also found that enabling these flags: #enable-v8-future #enable-experimental-canvas-features #enable-javascript-harmony gives good speed-up but it will anyway become slow after 10~20 pages.
,
Feb 16 2017
Thank you for providing more feedback. Adding requester "hdodda@chromium.org" for another review and adding "Needs-Review" label for tracking. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Feb 16 2017
hdodda@chromium.org so did you see my screencast?
,
Feb 20 2017
Unable to reproduce the issue on windows-7, Windows-10, Mac-10.12.2 and Linux Ubuntu-14.04 using chrome stable version 56.0.2924.87 and latest canary 58.0.3017.0 with the steps mentioned in comment#0. Reporter@ could you please upgrade the chrome to latest version and let us know your observations if the issue still persists. Thanks..
,
Feb 20 2017
@sureshkumari-- Recently i upgraded to 4x2.5Ghz CPU, and it is slightly better, but now after ~20 page it becomes slow, i think Chrome's scrolling uses a way much CPU(smooth even more) than other browser's scrolling... Also in task manager i see that processes [chrome.exe] in sum cant use more that 25% of cpu, but for Firefox procecesses with e10s enabled it can go up to 60%! Does that mean that e10s can handle CPU cores better than Chrome can? Testing was on latest Chrome stable version 56.0.2924.87, canary version 58.0.3018.0 and Nightly 54.0a1 (2017-02-19).
,
Feb 20 2017
I managed to make [chrome.exe] use too up to 60% but even so everything is lagging when i scroll... If i continue scrolling some time, and then stop it will still scroll ~1-2 secs, it looks like it is busy when i scroll, does that means that scrolling pages with a lot content is *busy work* for chrome? Because on firefox it is not.
,
Feb 28 2017
Thank you for providing more feedback. Adding requester "sureshkumari@chromium.org" for another review and adding "Needs-Review" label for tracking. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Mar 1 2017
Unable to reproduce the issue on Windows 7 (CPU-3.4GHz), Mac 10.12.3 & ubuntu 14.04 using reported version-58.0.2996.0,stable-56.0.2924.87 & Canary-58.0.3026.0 as per the above recent comments & find the below observation: 1.In full screen mode pages scrolled smoothly & it took just 1ms time to load the pages after 20 2.Same bahaviour observed on firefox browser also. 3.Tested other URl which has more pages & no issue observed. Please find the attached screencast for reference & it would be better if you provide us the screencast for the same. Note: As we can't attach a file more than 10MB , we are unable to show you all the pages scrolling in chrome. Thanks in advance.
,
Mar 2 2017
@jmukthavaram Okay I done another screencast: http://screencast-o-matic.com/watch/cben6T6TFi As you can see in chrome after ~17 page and extremly after ~23 its scrolling lags (looks like skipping some pixels), but in firefox no such issues even after ~40 pages.
,
Mar 2 2017
Thank you for providing more feedback. Adding requester "jmukthavaram@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Mar 10 2017
Could some one from Blink>Scroll team, please have a look into this issue. Thanks.
,
Mar 16 2017
Requesting the Blink>Scroll team to look into this issue and update the thread. Thank You...
,
Mar 16 2017
David, I myself tested this on Mac and couldn't see the lag on Chrome stable after even ~40 pages. Do you have any guess here?
,
Mar 16 2017
nzolghadr@chromium.org Didn't you see my screencast? (http://screencast-o-matic.com/watch/cben6T6TFi) It clearly shows how it is for me. By the way what are your PC specs?(my are on top)
,
Mar 17 2017
blademight@, it might be helpful if you attach a performance trace. The instructions for how to do that are here: https://www.chromium.org/developers/how-tos/submitting-a-performance-bug You probably won't be able to record for the whole duration so I'd recommend following your steps until things get really slow, then starting the trace, then doing a few scrolls.
,
Mar 17 2017
Actually, never mind, I managed to reproduce on my Linux laptop - I'm seeing wheel latency well over a second. I've attached a trace -- looking into it now.
,
Mar 17 2017
+tdresser@: it looks like we have a saturated main thread but we're dumping wheel events at a very high rate and they're getting backed up for longer and longer. Don't we have some kind of throttling mechanism in the queue? Is it failing in this case?
,
Mar 17 2017
+dtapuska@, any thoughts on why this would be happening?
,
Mar 17 2017
Why don't make rendering and scrolling on separate threads?
,
Mar 17 2017
Re #22, we're repainting the page every frame because of the position:fixed background. I'm not quite sure why this is triggering repaint, I thought it was only background-attachment:fixed that did. This means that we block scrolling on the main thread. If you delete the background, this should scroll much more smoothly.
,
Mar 17 2017
Or you can give the background one of the many properties that forces compositing like backface-visibility: hidden or will-change: transform or translateZ(0). Re #23, we don't automatically promote fixed position yet (issue 626200) due to a scroll position inconsistency bug when you have mixed composited and non composited viewport constrained elements ( issue 663291 ).
,
Mar 17 2017
sahel@ The GSB/GSU/GSE sequences are queuing up and should get coalesced. I believe the mouse wheel event queue is not setting the synthetic bit anymore which causing this coalescing to occur in the gesture event queue. I'm trying to remember how all this code works...
,
Mar 17 2017
Nope I checked I don't think this is a regression the synthetic bits were only set on MacOS when we have phase information. So this is kind of expected. I believe though it would be improved with wheel latching because the GSUs would collapse together.
,
Mar 17 2017
I thought we coalesced across GSB/GSE pairs. We definitely should.
,
Mar 17 2017
You can't coalesce across GSB/GSE pairs if you want to maintain the current hit testing approach. I think the right solution here is to block this on shipping scroll latching and then re-evaluate it after it has shipped. But the site is spinning a loop around and painting on every frame so it isn't a good site in general.
,
Mar 17 2017
+dtapuska@ About "isn't a good site in general." then why other browsers handles it? Maybe they [can] handle even *isn't good sites* too, so I think chromium should be able to do so as well too.
,
Apr 6 2017
Issue 700732 has been merged into this issue.
,
Apr 21 2017
Re #29: We know it's a problem with Chrome and it's being worked on.
,
Apr 21 2017
possibly another example but I'm not sure, go https://greenbeanery.ca/ in Edge vs Chrome and the scrolling, both touchscreen and mousewheel is much faster and more responsive in Edge
,
Apr 22 2017
Re #31: Ok, looking forward to it.
,
May 18 2017
Can we have the latest update on this issue? Tagging with M60.
,
May 18 2017
,
Mar 28 2018
Both wheel scroll latching and async wheel events are enabled by default in M65. With wheel scrolll latching we coalesce GSU events since they are not wrapped with GSB/GSE pairs, and with async wheel events we only wait for the main thread to handle the first wheel event of the sequence and if it is not prevented by default for the rest of the wheel events in a scroll sequence we scroll without waiting for the main thread to handle wheel events. |
|||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||
Comment 1 Deleted