Jump to content
Search Community

TimeLine add() append() vs on Complete performance

Maxime test
Moderator Tag

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

There is any performance difference between creating a series of Tweens linked each other with onComplete functions.


Or creating one TimeLine and adding callback logic and Tweens with the functions, add(), append(), addCallback()



Link to comment
Share on other sites

If performance applies only to speed, I strongly doubt there would be any noticeable or measurable difference.


However, if you you are using onComplete callbacks to create new tweens or tell tweens to play(), there will always be a very slight amount of time that elapses between the callback being called and the callback being executed... perhaps only a few milliseconds. If you are doing hundreds of tweens like this and expecting tight synchonization with other tweens or timers, there may be some time drift.  So basically if you chose to not use a timeline you are risking some degree of accuracy. 


Chaining more than 3 tweens and callbacks together using onComplete callbacks however is definitely a much less efficient and flexible approach that I would do my best to avoid. 

  • Like 3
Link to comment
Share on other sites



I'm extremely confident that the 4 hours your took to invest in learning and converting to TimelineLite/Max code will payoff not only for this project but for any future animation endeavors as well. Once you get some of the timeline basics down you'll be amazed at what you can do.


Happy Tweening!

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