Difference between TweenMax & TweenLite?
Asked Answered
A

1

5

Is there any speed or Garbage Collection difference between TweenMax & TweenLite ?

Actually currently i'm working on site in which i'm using more than 500 tween with TweenMax , and site works perfectly in firefox but in chrome and safari tween lag very badly.

Difference between TweenMax & TweenLite based on GC & speed ?

Assign answered 29/7, 2014 at 5:28 Comment(0)
W
10

It's highly unlikely you'd notice any performance difference between the two, but technically TweenLite is very slightly faster (again, I'd be shocked if it's even slightly noticeable) only because it doesn't have to accommodate quite as many features (like repeat/yoyo). TweenMax has a few more properties, so instances take up a bit more memory. Again, not significant. Both are super optimized for performance and GC shouldn't be an issue for either one.

In the VAST majority of cases, performance problems have nothing to do with TweenLite or TweenMax - it's graphics rendering in the browser that takes exponentially more horsepower to complete. In other words, JavaScript execution is a small percentage of the overall CPU/GPU drain. You might want to try setting force3D:true on tweens to force the target onto its own GPU layer.

My guess is that your Chrome/Safari issues are unrelated to TweenLite/TweenMax but I didn't have time to do a full analysis of your link. I saw that you have some pretty huge "composite layers" events (in excess of 60ms) in the Chrome Dev Tools timeline. The actual JS execution (which is what TweenLite/TweenMax do) looked plenty fast.

Wiencke answered 29/7, 2014 at 19:48 Comment(1)
i already follow this answer in your website forum , but again thanks, cheers! (:Assign

© 2022 - 2024 — McMap. All rights reserved.