Closed vojto closed 1 year ago
if you don't want to use json serialization or patches or snapshots you might just create a mobx observable.ref in the class as a class variable. note it will be volatile though and will only live as long as the class itself does
or if you don't even care about observability at all just a plain standard class variable would do
Thanks a lot, this is helpful!
Hey everyone,
I was wondering if there's any way of storing binary data in Mobx Keystone.
We are using YJS, and their format is binary.
We found that adding base64 serialization/deserialization adds a lot of memory overhead when dealing with larger amounts of data.
So for example– we read the documents from database, they come in binary format. Now we have to convert to base64 just so we can store them in Mobx Keystone models. And then back to binary, in order to initialize the YJS documents.
We don't care about JSON compatibility - we have custom binary format for serialization.
Is there any workaround you would suggest we use?
cc @maccman