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

perf: consider replacing broadcast channel with something else #107

Open
yusdacra opened this issue Dec 8, 2021 · 1 comment
Open

perf: consider replacing broadcast channel with something else #107

yusdacra opened this issue Dec 8, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@yusdacra
Copy link
Member

yusdacra commented Dec 8, 2021

A dashmap::DashMap<UserId, smallmap::Map<StreamId, EventSender>> where UserId is the u64 user id, StreamId is a u8. could probably be more memory efficient and faster (?) than the current solution (which is just a tokio broadcast channel + arced events). EventSender should be an unbounded sender so that we hold the lock for the least amount of time (smallmap also helps here as it is as fast as one can get with u8 keys)

@yusdacra yusdacra added the enhancement New feature or request label Dec 8, 2021
@yusdacra
Copy link
Member Author

This would need extensive benchmarking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant