some optimize to reduce lag and frame drop in endless mode