Performance improvements to run cmd5