optimizing text animation in multilines