-
Notifications
You must be signed in to change notification settings - Fork 130
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
Improve performance of websocket subscription using buffered pool #1477
Comments
hey @arijitAD, you suggest that we create a buffered pool with size = 256 * 256 (256 for imported and 256 for finalised ) then populate the buffered pool with the bytes generated by generateID() function and when we need to insert a new register on the map we call: id := bs.bufferdpool.Get()
// ...omitted code
bs.finalised[id] = ch // or bs.imported[id] = ch I don't know if this is the intended approach, but I've implemented a buffered pool to use with generatedID() here https://play.golang.org/p/_QFnMeqlNj1 |
Your buffer pool will not have a upper limit on the number of connection. You can take a look at this buffer pool code. https://github.com/oxtoacart/bpool/blob/master/bufferpool.go We just need to modify
|
🎉 This issue has been resolved in version 0.6.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Issue summary
Other information and links
The text was updated successfully, but these errors were encountered: