Return to Unity Plugin

iOS - GAFAnimationAssetInternal.OnEnable() super slow

All about Unity plug-in

iOS - GAFAnimationAssetInternal.OnEnable() super slow

Postby peter » April 13th, 2016, 9:48 pm

I ran into som serious performance trouble on the iPhone 4S.
May app has a really long GAF animation (About 8000 frames). It's been working very well on the latest iPhones, but when I tested it on the 4S it took over 2 minutes to initialise the scene.
Via profiling it looks like the GAFAnimationAssetInternal.OnEnable() is running for a very very long time, blocking everything else.
I've tried to slice the animation into "smaller" GAFs (2000 frames), the app still needs half a minute to enable one of these pieces on the 4S.
Is it any possibility to run the OnEnable asynchronously on a separate thread, or do anyone have other solutions to my performance problem?

Regards,
Peter
User avatar
peter
 
Posts: 3
Joined: December 15th, 2015, 2:54 am

Re: iOS - GAFAnimationAssetInternal.OnEnable() super slow

Postby Alexey Finkilshtein » April 15th, 2016, 2:30 am

Hi,

Could you send your unity test project with this animation? We can check it on our side and try to help you, but 8000 frames is really big animation for fast performance.

Thanks.
User avatar
Alexey Finkilshtein
 
Posts: 417
Joined: May 21st, 2014, 6:53 am

Re: iOS - GAFAnimationAssetInternal.OnEnable() super slow

Postby peter » April 21st, 2016, 4:24 am

We are now going for another approach where we are splitting it up in many smaller parts.
Even 4000 or 2000 frames takes too long time to initialize on the 4S device.
Can you confirm if the OnEnable function is looping and processing through all frames and states before the first frame is rendered? Any best practices when dealing with large timelines?
User avatar
peter
 
Posts: 3
Joined: December 15th, 2015, 2:54 am

Re: iOS - GAFAnimationAssetInternal.OnEnable() super slow

Postby Alexey Finkilshtein » April 22nd, 2016, 1:15 am

Hi,

If you will give us your test project with these animations, we could help you. If you don't want to give us this test project, then just try to use cache checkboxes in assetfile and movieclip options.

Thanks.
User avatar
Alexey Finkilshtein
 
Posts: 417
Joined: May 21st, 2014, 6:53 am

Re: iOS - GAFAnimationAssetInternal.OnEnable() super slow

Postby Кирилл Моргенштадский » April 10th, 2018, 8:04 am

Hello, same question is interesting for me.

I have not very big animation (530frames). Using BakedAnimator, cache ckeckmarks are on. And still I have strong drop during enabling BakedAnimator GameObject (GafBaseClip.OnEnable about 65-75% CPU in profiler) wich cause frame render time peak from 3-4ms to 12-15ms.

I use GAF for monsters animation. I have pooled stack of objects being enabled when it is needed (2-4 enables per sec).

Any advices on optimizing?
User avatar
Кирилл Моргенштадский
 
Posts: 5
Joined: June 8th, 2017, 2:09 am

Re: iOS - GAFAnimationAssetInternal.OnEnable() super slow

Postby Кирилл Моргенштадский » April 10th, 2018, 8:05 am

Remark: I use PC though, not iOS
User avatar
Кирилл Моргенштадский
 
Posts: 5
Joined: June 8th, 2017, 2:09 am

Re: iOS - GAFAnimationAssetInternal.OnEnable() super slow

Postby Кирилл Моргенштадский » May 15th, 2018, 6:33 am

Any thoughts or recommendations?..
User avatar
Кирилл Моргенштадский
 
Posts: 5
Joined: June 8th, 2017, 2:09 am

Return to Unity Plugin

Who is online

Users browsing this forum: No registered users and 2 guests