Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Story desktop GPU memory optimization so videos play smoothly. #23240

Merged

Conversation

gmajoulet
Copy link
Contributor

@gmajoulet gmajoulet commented Jul 9, 2019

The GPU memory used by our desktop three panels experience was so high that on some computers, the hardware-accelerated video decoding was stuttering, resulting on videos not playing.
(Hardware accelerated video decoding uses GPU, not CPU, which is why videos were playing smoothly when we were disabling it).

This fix gets all videos to play as smooth as expected in this desktop three panels layout, but as a nice side effect gets the overall experience much much faster.
Removing this box-shadow has no visible effect, since we removed the background images.

One line fix but really interesting performance improvements:

Device Max GPU memory / Min FPS before Max GPU memory / Min FPS after Improvement
Dell workstation (linux) ~73mb / 41 FPS 13mb / 56 FPS 5.6x less GPU memory used
MacBook pro 2017 13i ~280mb / 17 FPS ~60mb / 42 FPS 4.7x less GPU memory used

Fixes #23184

Copy link
Contributor

@Enriqe Enriqe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing! 🎉So the border-radius, even when 0, still had an effect? Or was it the box-shadow mainly?

@gmajoulet
Copy link
Contributor Author

border-radius is just some cleanup, it all came from the box-shadow

@newmuis
Copy link
Contributor

newmuis commented Jul 10, 2019

FYI @hongwei1990 since we added (or, drastically increased) this when we removed the background images

@gmajoulet gmajoulet merged commit 7bb30f3 into ampproject:master Jul 10, 2019
rindo pushed a commit to logly/amphtml that referenced this pull request Jul 24, 2019
…oject#23240)

* Performance optimization + getting the videos to play.

* border-radius + box-shadow properties.
thekorn pushed a commit to edelight/amphtml that referenced this pull request Sep 11, 2019
…oject#23240)

* Performance optimization + getting the videos to play.

* border-radius + box-shadow properties.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Video playback issues on story 3 panels desktop experience.
4 participants