Closed aumkar closed 2 years ago
Hard to pin-point what exactly is causing this without having the exact example, but looking at the dump it looks like it's mostly react reconciliating the dom/slate normalizing and not slate-yjs that is causing the massive CPU usage (which aligns with the benchmarks I've done, the thing slowing down large docs is slate(-react) itself and not slate-yjs)
Thanks a lot @BitPhinix for quick turn around!
Confirming that slate-yjs is not causing this issue. I'm able to reproduce it even without using withYjs
and withCursor
wrappers for the same test data.
In previous week I started evaluating Y.js and its integration with slate.js, because of facing some OOM and performance issues with slate-collaborative.
So first thing I wanted to is to benchmark Y.js for my use case. Libraries I’m using are:
I tried to create some large data by hand, so that the JSON created for slate.js object is around 800KB. I was able to collaborate just fine, but when typing faster than normal CPU hits 100%, which also resulted in some lag in reflecting typed words in editor.
Profiling dump (Generated from Chrome) Is it expected behaviour OR I’m doing something wrong?