Test performance optimization should be an essential part of the whole development process. It should even be part of the main end-user code development - if your mindset points in the direction of “well, if I develop that function/component in this way, how can I test it?”, you probably have already made the most important step of the optimization journey.