I see something weird in websocket messages between client and server. When syncing the document after connect, the server sends the same document content twice. It is something that is specific to Hocuspocus protocol? I don't see this for raw y-websocket, it sends content only once. When the document is large, this significantly increases time to sync.
I'm experimenting on live example here: https://templates.tiptap.dev/N9HkNRCwhN
Here is an example of messages between client and server. Two highlighted incoming messages contain identical document content.
Can someone explain, if it is expected and what is the need of sending it twice?
Steps to reproduce the bug
Steps to reproduce the behavior:
Open Network tab in developer tools in the browser
Find websocket connection to the collaboration server and open details
See document content received twice
Expected behavior
I would expect the full document content to be sent only once. Increasing amount of data transferred between server and client increases response time and affects user experience.
Description
I see something weird in websocket messages between client and server. When syncing the document after connect, the server sends the same document content twice. It is something that is specific to Hocuspocus protocol? I don't see this for raw y-websocket, it sends content only once. When the document is large, this significantly increases time to sync.
I'm experimenting on live example here: https://templates.tiptap.dev/N9HkNRCwhN Here is an example of messages between client and server. Two highlighted incoming messages contain identical document content.
Can someone explain, if it is expected and what is the need of sending it twice?
Steps to reproduce the bug Steps to reproduce the behavior:
Expected behavior I would expect the full document content to be sent only once. Increasing amount of data transferred between server and client increases response time and affects user experience.
Screenshot, video, or GIF See above.
Environment?