Hey folks! I finally wrote up a post about the performance improvements we made to React ProseMirror last year. In both writing this post and getting feedback from folks trying out the demo editors, I’ve learned some more interesting things about browser contenteditable performance:
- I didn’t really account for how much faster React’s production build is than the development build. I basically can’t type fast enough on my phone (Android or iPhone) to even notice the lag on the unmemoized editor
- Firefox on macOS is just crazy slow for large documents, basically no matter what. Just putting Moby Dick in a plain contenteditable is slow, putting it in the unmemoized editor is slow, and putting it in the memoized editor is best but still pretty slow
- Firefox on Linux is also pretty slow (not as bad as macOS) with plain contenteditables, but using beforeinput makes it much faster. The demo editor at React-ProseMirror Demo is much faster than than the demo editor at https://prosemirror.net for very large documents, but that’s also true of just putting Moby Dick in a plain contenteditable in Firefox.
- Safari on macOS is crazy fast haha. I couldn’t discern any lag at all on the unmemoized editor when I was testing on my m4 Mac Mini