New issue
Advanced search Search tips

Issue 643241 link

Starred by 4 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug-Regression



Sign in to add a comment

CSS transitions/animations are limited to half my refresh rate (30fps)

Reported by gordonra...@gmail.com, Sep 1 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.89 Safari/537.36

Steps to reproduce the problem:
1. Open any website that makes use of CSS transitions/animations.
2. Record a timeline in dev tools
3. Observe animations being limited to 30fps

What is the expected behavior?
The animations should run as fast as they are able up to the VSYNC rate, or, only throttle when poor performance is detected.

What went wrong?
All animations are limited to half my screen refresh rate, even when the workload can easily complete within frame budget.

Did this work before? Yes Chrome 52.

Chrome version: 53.0.2785.89  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 22.0 r0

The animations I have tested with are extremely simple transform changes and each element has it's own layer.

In Chrome 52 these same animations were a silky smooth 60fps and the timeline barely showed any activity.
 
Timeline example.png
12.2 KB View Download
Please find the attached dump of my chrome://gpu page.

This laptop is using an old core i7, with Intel HD Graphics 3000.  I have not been able to test this on any other devices/platforms.
chrome-gpu-dump.txt
12.3 KB View Download
Further investigation leads me to believe that this is some kind of vsync issue in Chrome.  It appears that multiple frames are stacking into a single monitor refresh, causing the terrible jerkiness.

If I start Chrome with -disable-gpu-vsync I get a consistent 200fps+, and of course, everything is silky smooth.
can you provide a link to a specific webpage where you see the problem?

RE your post in  issue 631166 : To test if  issue 631166  causes this, visit https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Win/, download chrome-win32.zip from 364106 and 364117 and extract into temp folders, close all open apps, and run chrome.exe from each, one at a time.  Is chrome from 364106 smooth, but chrome from 364117 jerky?

If so, that is the issue.  If not, you may want to try to bisect to find the specific rev that caused this and report?
Thanks for the suggestions.  I have done as you suggested and have tested chrome versions 364106 and 364117.

Both versions get a constant 60fps on the animations in question and appear super smooth.  The issue appeared in the very first stable release of 53, but I shall try to narrow it down to find the specific rev as you suggested.

Thanks again.
Okay, I have narrowed down the issue to a specific revision as suggested.

Since I am using the x64 version i retrieved the browser snapshots from:

https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Win_x64/


Revision 401791: 60fps
Revision 401797: 30fps

I have analyzed the timelines for the animation in each browser version and there is a clear difference in the GPU section.  

- In revision 401791, the one that is smooth, the GPU work is occurring only once per frame.

- In revision 401797, the one that appears jerky, the GPU work is occuring twice or more times, for each and every frame.

I have attached both timelines to illustrate this.  

Incidentally, even in 401791, every now and then, I get an occasional dropped from or two, with multiple GPU calls per frame, whereas in far older versions (like 364106) every frame is 'always' perfectly in sync and the result is an animation that is as smooth as butter.

Regardless, revision 401797 is where the big problem begins for me.

Timeline-401791.png
8.7 KB View Download
Timeline-401797.png
16.3 KB View Download
Okay, this is strange.  The bug that I am seeing appears to be in some way related to the new material design in Chrome's UI.

Something that I didn't realize was relevant, was that this animation get's triggered on 'popstate', i.e when the user navigates the back/forward browser buttons.

If I disable material design the problem goes away.  Presumably because the material design 'button' animation is no longer playing.

Furthermore if I navigate back/forward using the keyboard (Alt + Left/Right), the result is a 60fps animation again.

I'm really not sure why this tiny chrome UI animation would cause such a dramatic impact on my css transitions, but it absolutely annihilates anything that is animating at the same time, in the webapp.

Comment 7 by jer...@duckware.com, Feb 22 2017

Curious if you can still replicate?  r401796 "Turn on enable begin frame scheduling by default" seems the most likely cause.
Components: Blink>Animation
Components: -Blink>Animation Internals>GPU>Scheduling
Frame rate scheduling is governed outside of Blink animations.
Cc: sunn...@chromium.org
Owner: enne@chromium.org
Status: Assigned (was: Unconfirmed)

Sign in to add a comment