-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(core): re-subscribes to shared pair listener opens a new connection #8120
Conversation
… a new listener connection
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
No changes to documentation |
Component Testing Report Updated Dec 20, 2024 1:34 PM (UTC) ❌ Failed Tests (2) -- expand for details
|
⚡️ Editor Performance ReportUpdated Fri, 20 Dec 2024 13:35:22 GMT
Detailed information🏠 Reference resultThe performance result of
🧪 Experiment resultThe performance result of this branch
📚 Glossary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Such a great find!!! 💖
Description
While testing #8110 I noticed that even when preloading, clicking a document would cause a new listener request to be made.
Tracked this down to being caused by the memoization of the shared document pair listener. This PR fixes the issue by:
connector.complete()
trick with instead exposing a_keepalive
stream that we merge in with the (memoized & shared) stream of the pair listener. This ensures that the listener connection will be kept open for as long as there are subscribers to the pair object.What to review
sanity.studio.document.pair-listener
sanity.studio.document.pair-listener
sanity.studio.document.pair-listener
Testing
Existing tests should be enough
Notes for release
n/a