Snapshots - Versioning

Hi, been loving your library so far… but got a question I can’t find an answer.

If I have a Y.Doc with a single Y.Map property, this Y.Map property has several y.map inside of it (for example, Notes)

Inside of these Notes, are several properties, one being Y.XmlFragment

when I do my snapshot of the document and after I while I wish to revert just a single y.map from that previous snapshot is this possible ? (So basically have the whole y.doc stay the same but that specific ymap (notes) just be able to revert)

Also, I’ve read just now that having a single Y.map inside the document is a bad idea?

Many thanks

You could restore the snapshot and replace the new values with the old values.

Also, I’ve read just now that having a single Y.map inside the document is a bad idea?

I mentioned something like this, it mainly applies to “graph tools” - i.e. apps that render a lot of nodes and edges. But it really depends on your application. Do some performance testing and try to create one huge document. The bottleneck is memory usage, because Yjs holds everything in-memory - even some meta-information of deleted content, which is required for conflict-resolution.