optimize the cpu utilization and animation