5
votes

We have an application that generates around 100 animations at runtime and they are all added to a single storyboard and then played. The problem is that the animation is extremely slow. The objects that are being animated are shapes and splines and a good amount of computation is done in the backend for generating the custom splines. The running computer is a quad core with a good graphics card.

Any suggestions on how we can fix this? Do we need to split the animations into multiple storyboards or animate on different canvases?

Thank you

1
what OS version? How many UI elements are being animated?Dave Markle
Its running in windows 7. In each animation only one object is animated but there are around 100 animations in a storyboard.user180812
Is the animation merely changing the position of the objects or does it also involve changing the size/shape? If the first then it should be possible to animate that many objects. If the later then your giving the renderer a huge amount of computation and hence the slow perf.Phil Wright

1 Answers

2
votes

Its little difficult to know whats slowing down your animation without seeing animation and code. But I will give you general points that can help improving them.

  1. Move your calculation into different thread, if there is very heavy calculation. Dispatcher thread is busy doing your UI management so if you put everything into one thread that will certainly slow down things.
  2. Reuse your splines,shapes etc, this will certainly help you because you will also free your app from costly garbage collection routines. Infact before starting animation, display some different animation like clock etc to create all objects required in the beginning.
  3. Explore bitmap caching options and try to implement them.