Skip to main content
Participating Frequently
January 5, 2022
Question

Animate: html5 Canvas CPU problem in Firefox

  • January 5, 2022
  • 1 reply
  • 271 views

Hello,

When publishing a project in a html5 canvas from Animate, Firefox uses lots of CPU compared to Safari or Chrome even when the animation is stopped. Is there a setting/code to prevent Firefox from using so much CPU.

Thanks a lot!

    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    Community Expert
    January 5, 2022

    i don't see that problem.

    Participating Frequently
    January 5, 2022

    Thank you kglad!

     

    Here is a link to the exported project:

    https://www.cognitograph.ch/canvas/TestCanvas-2.html

    It is a simple motion tween over 20 frames, but with a rather big PNG-image (almost no code).

    I use MacOS Big Sur.

    In Firefox 95.0.2 the animation is smooth, but the page takes up to 95% of CPU after the animation has stopped.

    In Safari 15.1 the animation is not smooth, but the page doesn't take more than 12% of CPU after the animation has stopped.

     

    Perhaps it would be better to execute the scaling and the tweens directly in JavaScript and not over the Adobe Animate timeline?

     

    I'm even wondering if it is a good idea to use html5 canvas for such big animated images (in the final project I would also like to add sound) or if there is a better way to do this?

     

    Thank again for your help!

    kglad
    Community Expert
    Community Expert
    January 8, 2022

    i generally don't download and fix problems unless i'm hired.

     

    free help you can get via the adobe forums, but there's a limit to what can be done in the forums, and finding and fixing your problem isn't (i believe) possible without more information on your end.  (and i'm not sure what information that would be.)  

     

    my original response to your post was to point out, there's nothing about chrome and animate's html5 that always causes a problem.  have you tested in other browsers to confirm the problem is specific to chrome?

     

    and you could try checking chrome's developer console to see if anything helpful is there. a comparison with browser consoles that have no problem might be even more informative.