Skip to content
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

Allow provider awareness to be disabled #675

Merged
merged 1 commit into from
Aug 12, 2023

Conversation

raineorshine
Copy link
Contributor

@raineorshine raineorshine commented Aug 10, 2023

Fixes #673

Awareness provides an additional overhead of computation, memory, and network usage for each provider. This can become significant when there are hundreds of documents that are multiplexed through a single websocket connection.

This PR allows users to opt-out of the provider's default Awareness instance by specifying awareness: null in the config.

If awareness is disabled...

  • The Awareness instance will not be instantiated and AwarenessMessages will not be sent to the server.
  • setAwarenessField will throw an error.
  • AwarenessMessages from the server will be ignored.

Open to feedback, and will add documentation if approved :)

@janthurau janthurau merged commit db3d947 into ueberdosis:main Aug 12, 2023
3 checks passed
janthurau pushed a commit to YousefED/hocuspocus that referenced this pull request Aug 12, 2023
@raineorshine raineorshine deleted the disable-awareness branch October 15, 2023 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants