To obtain a lightweight code, I am currently using a boolean variable to decide whether information messages should be printed or not, depending on whether the camera is connected to the IDE (in which case we want informative messages) or running on battery (in which case we don’t need these messages and need speed).
When saving a script to the camera, we are prompted to remove comments and spaces. Should we be worried about print() commands too, should we remove them, or are they simply not relevant because there is nothing to print to, so that we don’t get a speed penalty when we don’t remove them? How is this handled best?