Optimized the adding and removing of dom comment elements when changing player header