Jump to content
Search Community

High CPU usage with basic (but repeating) animation.

Steffen Wenzel test
Moderator Tag

Go to solution Solved by Dipscom,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

This animation uses 50%+ of the cpu on my MacBook Pro (2,6 GHz Intel Core i5, Late 2013) in Firefox (43.0.3). I know I'm constantly doing something but I though opacity was a "cheap" property to animate especially when leveraging requestAnimationFrame. As I'm still new to GSAP I'd like to now if this is normal or if I'm doing something wrong

See the Pen KVavrZ by anon (@anon) on CodePen

Link to comment
Share on other sites

  • Solution

Hi Stefffen Wenzel, welcome to the forums,

 

Are you getting 50% CPU usage constantly while testing? I had a quick look here and it does spike to 50% on load and all but after it goes down to 10-15%. Have a think of what else could be running in Firefox at the same time (extensions, plugins, etc). Have you tried running it in privacy mode? With all extras disabled? 

 

Also, if you only get this unreasonable level of CPU usage, I would imagine the issue is with Firefox, not with your animation or GSAP itself.

Link to comment
Share on other sites

I did some digging after you all said that this load is not normal. JSFiddle reduced the load by about 10% but it did not drop. Deactivating plugins/extension (Firebug etc.) did not help either. The culprit was the display settings. I'm running the MacBook in scaled (non retina) resolution and it even says on the panel that this can reduce performance. Using the default resolution keeps everything quiet, using scaled (and Firefox) makes the fans kick in after a minute.

 

Knowing this, I'm more relaxed about the perfomance of my page now. Thanks!

  • Like 1
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...