Yjs vs Yrs performance

Hi all,

Is there a performance/memory comparison between Yjs in node and Yrs?
We want to decide which one to use for a golang project. Yjs has more functionalities around it while requiring a node dependency. We want to see whether the performance/memory gain of using Yrs worth the additional developing effort or not.

Best,
Reza

Yjs doesn’t require Node though. You could use Bun, for example.

This predates yrs but another option for golang apps is this library I wrote. It runs yjs in a v8 context within the go app.

In terms of memory and speed I’ve found it scales quickly with document size / number of edits. I flatten my yjs documents before saving to the database by converting them to text or json and throwing out the history to prevent endless document growth – with the cost of not being able to undo individual edits past the save point. But I save document revisions separately so at that grain users have the option to roll back to a previous save.

1 Like

Saving the history separately makes sense. I will try to see how using yrs goes in my golang app. If it turns our ok, we can publish the code for others to use and improve.