There’s definitely a lot of design decisions each with tradeoffs so I’d be very interested in seeing your implementation and what choices were made and how, especially how it differs with Etherpad’s easysync.
I’m not surprised rich-text might be slower than other implementations with similar functionality. This is my second rich text OT implementation and this time I opted for simplicity over execution speed. If you look at the source code for most OT libraries, they are a multi-screen mess of indexes and offsets, impossible to reason about without a debugger or pen and paper and very intimidating to an unfamiliar reader. The iterator abstraction is one example of a tradeoff I made where it greatly simplified the implementation (and a reader’s ability to understand the code) but certainly adds a small amount of execution overhead. I think this is a good tradeoff considering modern CPUs and the fact that this type can still run thousands of operations a second but yes execution speed was sacrificed when implementing this type.
I will say that though the fuzzer is not a good test of performance. The complexity of ops that you give the fuzzer will greatly influence execution speed since most of these functions scale linearly to the number of operations. So an easy way to "game" the fuzzer is to give it simple or small operations but then the type won’t be as thoroughly tested.
Rich-text is not an invertible type since it doesn’t store what gets deleted. It’s impossible to invert the “delete 100 characters” instruction since it doesn’t store what those 100 characters were but of course the benefit is the 100 characters doesn’t have to be stored. The decision to not support this was based off the observation that invert is not used very often but adds significant overhead to normal operations. In its most popular use case in an undo manager (the only place Quill might use invert), the same can be accomplished with diff() since `type.invert(delta, originalDoc) === type.diff(originalDoc, type.apply(originalDoc, delta))`.
In any case happy to see more development and discussion in the space!