Jump to content
Search Community

Safari Performance Bug

BenjaminLeguizamon test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

Hi! First time posting here. Maybe you can guide me on what i'm doing wrong. I'm using background-position to animate, i know it not the best performance wise but i was also happening with transform translate. When animating on chrome and firefox it works fine but on safari it has like a jumpy effect and i can't get rid of that.

See the Pen QWxwKGp by benjaminleguizamon (@benjaminleguizamon) on CodePen

Link to comment
Share on other sites

  • Solution

Welcome, @BenjaminLeguizamon!

 

Your biggest problem: 

transition: .3s linear;

You should NEVER apply CSS transitions to the same thing you're animating with GSAP. It's horrible for performance and screws up your timing. Every time GSAP tries to set the value, CSS transitions step in and say "NOPE! I won't let you do that...I'm gonna drag that out for 0.3 seconds..." (and that happens literally on every tick of the animation (typically 60 times per second). 

 

It also looks like Safari has a tough time rendering (totally unrelated to GSAP) unless you set will-change: transform on the element you're animating. Once I fixed those two things, it looked silky smooth in Safari (for me at least). 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...