Handling slow mergeUpdates on server

Just one last word on Y.mergeUpdates. It is crazy fast compared to loading a document to a Yjs document. However, it does not perform garbage-collection. You clients will spend some extra time to garbage-collect information that is not needed anymore. This actually can get pretty expensive over time if the server never performs garbage-collection.

You should try to load the document on the server to a Yjs document from time to time to perform garbage-collection.