We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Recently,I used go tool trace to test my project which uses ws v1.0.4.The log shows readData function triggers gc easily when creates "Reader".
runtime.mallocgc:1166 runtime.newobject:1177 github.com/gobwas/ws/wsutil.readData:250 github.com/gobwas/ws/wsutil.ReadData:88 github.com/gobwas/ws/wsutil.ReadClientData:97
In my project,I use a goroutine to recieve remote data.
for { select { case _, ok := <-c.Stop: if !ok { return } default: message, msgType, err := websocketUtil.ReadClientData(*c.Conn) if err != nil { break } c.Received <- model.ClientMessage{Type: msgType, Data: message} } }
Can optimize performance if use sync.Pool to reuse "Reader"? Reader contains many members,how to reset them properly?
The text was updated successfully, but these errors were encountered:
I have the same problem as you
Sorry, something went wrong.
No branches or pull requests
Recently,I used go tool trace to test my project which uses ws v1.0.4.The log shows readData function triggers gc easily when creates "Reader".
In my project,I use a goroutine to recieve remote data.
Can optimize performance if use sync.Pool to reuse "Reader"?
Reader contains many members,how to reset them properly?
The text was updated successfully, but these errors were encountered: