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

Y.js V2 Update Format #808

Open
MentalGear opened this issue Feb 17, 2024 · 4 comments
Open

Y.js V2 Update Format #808

MentalGear opened this issue Feb 17, 2024 · 4 comments

Comments

@MentalGear
Copy link

(I didn't find anything in docs on this.)

Please support Y.js V2 Update Format, which provides much better compression.
https://github.com/yjs/yjs#using-v2-update-format

@threepointone
Copy link
Contributor

Yeah we should do this, but I don't think it'll happen soon; we'd have to make sure it' backward compatible with existing projects/persisted data. Happy to review a PR.

@MentalGear
Copy link
Author

How's about making it a opt-in, so it's easier to get started? New projects could start with V2, and get the performance benefits, right away!

@MentalGear
Copy link
Author

@threepointone What do you think about the previous idea mentioned? If you could outline how this first opt-in version can be added, I'm open to give it a try.

@raymonddaikon
Copy link

raymonddaikon commented Mar 25, 2024

I think just adding an option to YPartyKitProvider would work. So something like { updateProtocol: 'V1' } then using that as a flag to either transform the incoming update via the helper function convertUpdateFormatV1ToV2 (ref) or just directly pass the update.

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

No branches or pull requests

3 participants