I have a problem in the performance of my program

Press ctrl+T for auto formatting and you will probably spot the error as well.

You do know that pressing the button in the middle of the animation is pointless this way?