I know that a Batch will generally run faster when the
Database.Stateful marker interface is not used.
What I don't know is, how badly the serializing and deserializing of state between each execute affects performance.
How much would it help to reduce the state to a minimum? Or are the costs nearly always the same? No matter how much data needs to maintained?
I am asking because I am running into heap limits when batching over a large collection. I could reduce the heap consumption by moving parts of the data passed into execute by putting it into the state.