July 22nd, 2024

Improving Tiptap's Performance for Anthropic's Claude Interface

Tiptap's Philip reported performance issues with Anthropic's claude.ai using their editor. Tiptap released version 2.5 to improve performance by reducing unnecessary re-renders and optimizing content conversion.

Improving Tiptap's Performance for Anthropic's Claude Interface

Philip from Tiptap has reported that Anthropic is utilizing their open-source editor for the claude.ai interface, but performance issues have been observed even on high-end devices like the M3 MacBook Pro. Tiptap's senior engineer, Nicholas, investigated the performance problems using Chrome Dev Tools and identified several key issues. Firstly, each keystroke in the editor triggers two renders of the PromptInput component. Secondly, there are duplicate extensions with the same name, which can be resolved by assigning a unique name property to each extension. Lastly, the editor is converting content from HTML to markdown on every update, even before the user submits their prompt, leading to unnecessary re-renders.

To address these issues, Tiptap has released version 2.5, which improves performance by allowing only the initial render of the editor, eliminating re-renders on keystrokes if integrated correctly. It is also recommended to convert editor content to markdown only upon submission to avoid extra re-renders. Additionally, the new version allows reusing the editor instance, reducing sensitivity to re-renders, although minimizing re-renders is still advised for a smoother typing experience.

Tiptap aims to assist Anthropic in optimizing their integration, expressing a desire to enhance the performance of the Claude interface. They invite feedback and discussion on these findings and other potential optimization strategies for rich text editing in AI applications.

Link Icon 6 comments
By @nickthesick - 4 months
If you need any help with this, don't hesitate to reach out at humans@tiptap.dev
By @psawaya - 4 months
FYI I just shared this with someone who works in engineering at Anthropic
By @v3ss0n - 4 months
I would like you guys to mention about ProseMirror .There is zero mentioning about ProseMirror on home page even tho it had done 90% of the job for your library. Also any bit of customization or deeper use of TipTap requires Prosemirror.
By @v3ss0n - 4 months
Reminder: tiptap's heavylifting was Done by prose mirror. Tiptap is just a wrapper on top