New issue
Advanced search Search tips

Issue 899462 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Nov 13
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Poor performance when using Pixelbook touchscreen on photo sliders in an article on The Verge

Reported by tweenk...@gmail.com, Oct 27

Issue description

Chrome 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)
 
Components: Blink>Input
Labels: OS-Linux
Owner: bokan@chromium.org
Status: Assigned (was: Unconfirmed)
Can confirm on Linux 70.0.3538.77. Trace attached
trace_photo-compare.json.gz
8.4 MB Download
Cc: bokan@chromium.org dtapu...@chromium.org nzolghadr@chromium.org
Owner: ----
Status: Untriaged (was: Assigned)
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?
Ping: Dave, Navid, any thoughts as to what's going on here? I'm not super well versed on the touch event processing pipeline
Owner: nzolghadr@chromium.org
Status: Assigned (was: Untriaged)
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.
Cc: altimin@chromium.org
+altimin@. Trace with renderer.scheduler category attached.
trace_verge_touch.json.gz
9.1 MB Download
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?
Cc: sahel@chromium.org
Owner: sahel@chromium.org
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.
Cc: chaopeng@chromium.org
+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?
>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.
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.


Setting overscroll-behavior-x:contain/none for the slider div also prevents triggering gesture navigation when the user horizontally scrolls on the div.
Status: WontFix (was: Assigned)
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