Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
gilloub

TweenLite TimelineLite garbage collector

Recommended Posts

Hello,

 

I used TweenLite and TimelineLite for a game project based on pixijs for graphics part. I did memory test on chrome and realised that when I create use tween / timeline for my sprites I have have leap sawtooth. 

Is there any pooling mecanism in the lib in order to reuse the tweens when there animation is complete.

 

 

Cheers,

Link to post
Share on other sites

I've done a lot of testing and research on the whole "reusing objects to alleviate garbage collection" and there are a ton of misunderstandings around that. It sounds really good in theory but in reality there can be some heavy costs because you must "clean" those objects which eats up resources and can actually be more costly performance-wise. Also, it can be problematic in an object-oriented framework where people may hang on to tween references so that they can restart() them later (or whatever) and if you reuse objects internally, it can mess that up (your tween instance might get re-used underneath you and you'd be restarting a different animation altogether). 

 

So ultimately I found that the current model we use is actually better for performance overall. And that's your bigger goal, right? (Performance)

  • Like 3
Link to post
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.

×