Slowdown when playing a spine animation (was: Android build error)


Android bundle on Ubuntu and OSX fails with error: Unable to bundle application, Reason: errors occured during the build.
Console output:
2017-10-05 23:00:59,812 ERROR [ModalContext] c.d.c.e.h.AbstractBundleHandler [] Unable to bundle application
org.eclipse.core.internal.resources.ResourceException: Errors occurred during the build.
at org.eclipse.core.internal.resources.Project$ ~[org.eclipse.core.resources_3.8.1.v20121114-124432.jar:na]
at ~[org.eclipse.core.resources_3.8.1.v20121114-124432.jar:na]
at org.eclipse.core.internal.resources.Project.internalBuild( ~[org.eclipse.core.resources_3.8.1.v20121114-124432.jar:na]
at ~[org.eclipse.core.resources_3.8.1.v20121114-124432.jar:na]
at$BundleRunnable.buildProject( ~[na:na]
at$ ~[na:na]
at org.eclipse.jface.operation.ModalContext$ [org.eclipse.jface_3.8.0.v20120912-135020.jar:na]

Can you, please, help us with debugging? What can cause the problem? Can this be connected with big quantity of images/atlases?


Not sure why this happens. Would you mind trying in Editor 2 as well (we’re trying to move away from the old editor as much as possible)? Could you invite me ( to the project as well so I can take a look?


Hi. Editor 2 gave us an exception, so we found problem with build and fixed it. Thanks a lot.
But now we have another problem - performance issues on android devices (tested on Lenovo Tab 2 A10-70L). Animations works slowly in some places… Could you, please, give us directions for debugging and fixing those issues. Here is Web Profiler snapshot from place where we have slowdowns.

I’ve added you to our project, so maybe you will have possibility to check.
Slowdowns are on splash screen (when you switching book pages) and on page overlay (start of 3,4,5,6 pages).
Thanks in advance.


Do you remember what exception you got? Did you report it?


It was exception connected with wrong field in Spine animation JSON (‘twoColors’ i guess), which was caused by using colors blending in Spine. We didn’t reported an exception.


What kind of animations are we talking about? Spine animations, flipbook, tweens using go.animate?


Spine animation that is ran then we unload one page (collection proxy) and load next one.


Ok, are you using async_load when you load the collection? Is the animation playing fine if you would try to use it elsewhere?


Yes, we use async_load.
We didn’t try to use this animation elsewhere, but we have another one (page overlay animation), which behaves the same (they both have few (3-4) layers which moves and same main character movement).


Ok, so it’s not related to the engine doing heavy stuff such as loading of assets? Not really sure what could be wrong then. @Johan_Beck-Noren any ideas?


Hello @thaiduchyk,

Hmm from the numbers in the profiler in looks like the majority of the frame time is spent in Graphics.Clear.

Are you seeing the animation slowdowns on other platforms as well or just the android tablet?


Hello @Johan_Beck-Noren ,
We see same slowdowns then running Editor on Ubuntu.
Also on other Android devices.


Hello again.
So, do you have any ideas for further debugging/fixing the problem?


Hi @thaiduchyk,

Since most of the time is spent in Graphics.Clear the slowdown is probably not caused by the engine doing heavy computations or anything like that.

If you are using a custom render script you can try removing the call to render.clear and see if that speeds things up. Odds are the problem is somewhere else and just manifests itself in the call to render.clear.

Is it only the spine animations that slow down or is the entire game? If you add a sprite that animates back and forth for example, does it slow down as well?


We checked render script and there are no custom calls to render.clear… Also we tried using default render script and slowdowns are the same.

We are using only Spine animations, a lot of them. Slowdowns are only in 2 places:

  1. then we show splash screen with animations while switching between pages (collection proxies), we unload one and async load another. At this moment we have 2 more collection proxies loaded, which are disabled.
  2. then we show overlay screen on top of our main screen (we have a lot of layers and animations run simultaneously)

While debugging case 1 we tried to run project with only 1 collection proxy running our splash screen and it was fine (no slowdowns).

So could this be connected with a lot data loaded in memory (3-4 collection proxies, about 800 MB memory usage on profiler)?? Or its more likely the problems with graphics rendering? Could image quality and size influence graphics performance??