[RFC] ERP5Type.Base: .serialize() is possible without writing object to DB
Hello,
I've noticed some project explicitly disable .serialize(), e.g. via passing serialize=False to BigFile._read_data() to avoid wasting disk space via not committing unchanged BTreeNode.
This can be avoided since ZODB provides explicit API to make sure object stays unchanged during commit, without marking it as changed - Connection.readCurrent(obj).
Thus this way if we fix .serialize() not to "change" object, we can drop workarounds to disable it everywhere. Also less space will be wasted in all places where .serialize() is used.
Not tested.
/cc @vpelletier, @jm, @seb