Poor performance when using Pixelbook touchscreen on photo sliders in an article on The Verge
Reported by
tweenk...@gmail.com,
Oct 27
|
||||||||
Issue descriptionChrome Version : 71.0.3578.21 OS Version: 11151.11.0 URLs (if applicable) : https://www.theverge.com/2018/10/25/18021944/google-night-sight-pixel-3-camera-samples What steps will reproduce the problem? 1. Open the URL on Pixelbook 2. Use touchscreen to move sliders on the comparison photos What is the expected result? The slider position updates smoothly What happens instead of that? Los of jank. The slider position updates twice per second. This does not occur when using the touchpad. Please provide any additional information below. Attach a screenshot if possible. UserAgentString: Mozilla/5.0 (X11; CrOS x86_64 11151.11.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.21 Safari/537.36 Tested on Pixelbook (256 GB US model)
,
Nov 1
Can confirm on Linux 70.0.3538.77. Trace attached
,
Nov 2
Taking a look - I'm not sure I understand what's happening. It looks like the touchmove events are being sent as NonBlocking but the event listener on the DIV containing the image is specified as |passive: false|. Additionally, it looks like even after the touchmove is dispatched from the compositor thread, it can take ~10 begin main frames until it's processed. Someone more familiar with this should take a deeper look. Marking as untriaged so we remember to take another look. +dtapuska@: Any idea why the touchmoves over a non-passive event handler are being dispatched as non-blocking? Or why it can take a long time for a touchmove to be handled on a relatively idle main thread?
,
Nov 8
Ping: Dave, Navid, any thoughts as to what's going on here? I'm not super well versed on the touch event processing pipeline
,
Nov 8
,
Nov 8
Since it doesn't seem to be maxing out the CPU I'd look at the scheduler. It might be throttling setTimeout events causing jankiness. I believe that information should be in a trace if it is throttled.
,
Nov 9
+altimin@. Trace with renderer.scheduler category attached.
,
Nov 9
I'm not sure what to look for in the scheduler trace so maybe Alexander can take a look. But it does seem fishy to me that the photo slider on the page has |passive: false| touch handlers but we're sending the events as non-blocking (and immediately ACKing them as IGNORED). Is that expected? Presumably when we get non-blocking (that does mean passive, right?) touches in the renderer, we forward them to main lazily/throttled?
,
Nov 13
I believe the back-forward feature on Chrome book is interfering with this. As soon as you add a good touch action to the picture (like I guess pan-y is what they want) it will be smooth. CC Sahel as she is more familiar with that back/forward gesture.
,
Nov 13
+chaopeng@ since he's implemented gesture based navigation and may have some insight. Interesting that touch-action does it. They have non-passive listeners registered though, I would expect us to block turning the touches into scrolls until they're ACKd. Perhaps the page isn't preventDefaulting the horizontal touches? Would that cause us to start scrolling and then throttle the |TouchMove|s we send to the page?
,
Nov 13
>Interesting that touch-action does it. They have non-passive listeners registered though, I would expect us to block turning the touches into scrolls until they're ACKd. With passive touch event handling if the first touch move in the sequence is not prevented by default, the rest of the touch move events in the sequence are none blocking.
,
Nov 13
Like Nzolghadr@ mentioned in comment #9 adding touch-action: pan-y; to the slider seems the right approach to me. Similar issue happens if the user tries to touchscreen pinch zoom on the slider, or when the user scrolls vertically on the slider but the touch moves have a very small horizontal delta.
,
Nov 13
Setting overscroll-behavior-x:contain/none for the slider div also prevents triggering gesture navigation when the user horizontally scrolls on the div.
,
Nov 13
Thanks for the info. I'd chalk this up to WAI and a site-issue since adding an event listener that preventDefaults the TouchMoves fixes the issue. The even better solution for them would be touch-action. In any case, there's no action for us here. |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by dtapu...@chromium.org
, Oct 31