applyUpdate in YJS is too slow

We use yjs to work with excel and updates can be 3-4MB in the case of large documents. Page initialization, the initial ydoc without gc applyUpdate is very slow and can reach more than 3 seconds, this is really too long for users to wait, what is the method to solve it? Thanks for the answer

我们使用yjs去协同excel,在大文档的情况下,updates可能达到3-4MB。页面初始化,初始ydoc不gc的情况下applyUpdate十分缓慢能达到3秒以上的时间,这对用户来说实在等待时间太久了,请问有什么方法可以解决吗?感谢解答

You could use Ywasm, which has a larger bundle size, but parses documents faster. I also suggest decreasing the amount of information you store in a Yjs document. Often, there is a lot of duplicate information in data structures. By using a more efficient representation of your data, you can reduce the amount of data stored and the parsing time. Unfortunately, some Yjs integrations into excel-like tools are implemented extremely inefficiently (basically using a single top-level Y.Map).

I’m very happy to give you a pricing information to implement an efficient binding for a specific tabular tool. I’d love to build a Yjs binding to one of the popular Excel-like libraries.