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

Slow after 100 clients? #56

Closed
adelriosantiago opened this issue Feb 9, 2018 · 2 comments
Closed

Slow after 100 clients? #56

adelriosantiago opened this issue Feb 9, 2018 · 2 comments

Comments

@adelriosantiago
Copy link

Could you please expand on this:

Caveats: Small number of collaborators: Automerge is designed for small-group collaborations. While there is no hard limit on the number of devices that can update a document, performance will degrade if you go beyond, say, 100 devices or so.

What causes this? Some kind of change history? I'm looking to switch to CRDT but this limitation could be a bit problematic.

@adelriosantiago adelriosantiago changed the title Why it gets slow after 100 clients? Slow after 100 clients? Feb 9, 2018
@pvh
Copy link
Member

pvh commented Feb 9, 2018

Every client extends the vector clock width, so each new operation has to record the state of all the other actors that were visible when it was made. As you add more clients, this becomes ever more expensive.

We think this is not a fundamental limitation but rather an opportunity for optimization. If you are interested in using automerge then some detailed notes about your use case, benchmarks for where and how things get slow, or even better, a design or patch that mitigates the performance problems are all welcome contributions.

@ept
Copy link
Member

ept commented Feb 9, 2018

Also, this caveat is less true now than when it was written. The internal change storage now uses minimised vector clocks that don't include all actor IDs, but only those actor IDs that have made changes. Thus, the cost of having a lot of actor IDs is now lower than it used to be, assuming that only a small number of actors are active at any one time. However, there are still some places that use full-width vector clocks (notably, Automerge.Connection for synchronising clients), so it's still a good idea to be a bit careful about how many actor IDs are generated.

@ept ept closed this as completed Feb 9, 2018
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