Print commands while not connected to IDE

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?

It won’t really matter. It’s not a significant activity.

So do you mean it is best to avoid printing anything when the camera is running on battery (i.e., not connected to the IDE) as it could enhance performance?

Seemed to have edited my above response. But, printing is not really a big deal.