Enable/Disable smoothing script
I have no idea where to start with scripting but I'm looking for a way to select all items within a scene with a smoothing modifier and set the smoothing to off, to minimize program lag then reverse the operation by selecting all items again and re-setting the smoothing to on. I can do it manually, but its time consuming and I'm looking for a way to reduce the number of clicks I need to make.

Comments
I actually have one, though it is rather old so you may want to revise it https://www.dropbox.com/s/bwgw8ckbk46ysif/ToggleSmoothing.zip?dl=0
That looks to be what I'm after. Thank you.
Thanks Richard!
I modified this to turn off Interactive Smoothing, since that's the bulk of the delay in my experience, and it means I don't render a batch of images with smoothing turned off by accident.