Is it safe to drop cleanup updates?

In our application user edits are made with a non-null origin. I’ve noticed that the YDoc will emit (via YDoc.on(“update”, callback)) some extra updates that have a null origin. These appear to result from cleanup transactions that only ever add to the delete set and do not bump client clocks. I’ve noticed that these cleanup operations significantly add to network traffic when we have a lot of clients interacting with the same document. For example a client will receive an update from another client and then emit a cleanup update in response even though there have been no local edits. There’s probably a lot we could do to throttle our synchronization of updates between clients but my question is if it is safe to ignore these updates when synchronizing updates between clients. If we drop updates with null origin when syncing between clients, do we risk dropping user edits?

I suspect that you are using the Y.Text type extensively.

I also suspect that some of your plugins perform a lot of unnecessary transformations (like re-formatting attributes throughout the whole document). This might be very bad for performance if this is done a lot.

There might be edge-cases when not propagating cleanup events will lead to inconsistencies (content might be “formatted” for some users, but not for others). But I don’t think there will be any loss of text-content.