Right now I am working on a custom field like Plone JSONField and I need to think about space (size of data) in ZODB.
My question here which python data type would be a space saver (data size) and faster in pickling, is that plain string or dict in ZODB?
Thank you so much, guys, for your valuable opinions. Actually I have tested this version https://pypi.org/project/plone.app.fhirfield/5.0.0b1/ JSON string as field value but found not so visible differences between field value as ObjectStorage(Persistent) (https://pypi.org/project/plone.app.fhirfield/4.0.0/) in terms of ZODB size which was my primary concern. In fact, value as object is faster than value as JSON string. Metrics are like:
Total JSON Files: 19500
ZODB Size after creating objects using RESTAPI: 22.3+ GB [JSON string as field value]
ZODB Size after zeopack : 236 MB (JSON str as field value)
ZODB Size after creating objects using RESTAPI: 22.5+ GB [Persistent object as field value]
ZODB Size after zeopack : 288 MB (Persistent object as field value)