ProseMirror vs Lexical performance test

Hey everyone,

At Emergence Engineering we were curious about Lexical, Meta’s relatively new rich text editor framework. We’ve been working with ProseMirror for a long time, and a new contender in this space is always interesting, especially if it’s backed by a huge company. So we tested both on the performance front to see if Meta’s solution is better or not:

My conclusion: ProseMirror wins.

5 Likes

Thanks, interesting post!

Meanwhile, we recorded the timestamps in every 200 nodes to see how the increasing content affects their speed (and loss).

This statement wasn’t completely clear to me.

Conclusions : Lexical’s total of script executing time increases faster than ProseMirror’s, which is probably linked to its faster handling of increasing content and more frequent garbage collection.

I think this should be “slower handling of increasing content”.

Memory usage difference is over 2 orders of magnitude?!

Hey,

we just got an update for this article and the memory consumption was caused by Lexical’s history plugin. Without that they’re kind of similar, will post an update soon!

1 Like

It seems like the only place Lexical surpasses ProseMirror is in LayoutCount.

I wonder if, in the long run, ProseMirror could be optimized in this regard.

1 Like

For me it looks like Lexical has a little bit better performance, worse docs, same bundle size, worse community / tooling.

I don’t understand how Lexical has better performance. The results seem to suggest otherwise except for that single point. Can you elaborate on your thoughts?

It’s in the first graph: it does more nodes in less time. I find it hard to make real sense of the results too btw :slight_smile: The higher scriptTime could mean that it would choke the even queue earlier ( with more plugins etc ), then ProseMirror could be faster, but I didn’t want to get into such theories.

Will publish the updated results this week ( without History, which caused the high memory usage ), they show a little bit of lead for Lexical in every graph except memory which is still a bit higher.

1 Like

Does Lexical include history in its core? I feel like testing without history paints an unrealistic picture of real-world use, although it does get to the core functionality better.

I see I read the NodeCount results inverse of what was intended though, so that explains a bit of my confusion.

I still agree that ProseMirror is the right choice these days. I did a lot of research into Lexical and started implementing it before I threw up my hands and moved to ProseMirror (via TipTap.)

1 Like

Update: we’ve re-tested with disabled History in Lexical, now they’re close with Lexical usually leading a little bit. Check the updated article! Still, ProseMirror is the better choice nowadays.