add memory pool to alternative option
Is there an existing feature request for this?
- [x] I have searched the existing feature requests
Is your feature request related to a problem? Please describe.
We have the problem receiving a lot of small websocket packet. The lib alloc a lot of small object:
// case 1
reader,_,_ :=conn.NextReader()
// case 2
buf,_, _ := conn.ReadeMessage()
Describe the solution that you would like.
In great small packet case, a sync pool is needed. This cound be alternative option for the lib
Describe alternatives you have considered.
No response
Anything else?
No response
ReadMessage is a helper function that calls the lower-level NextReader and io.Reader methods. Call the low-level methods directly to control memory allocation.
ReadMessage is a helper function that calls the lower-level NextReader and io.Reader methods. Call the low-level methods directly to control memory allocation.`
the memory ReadMessage method that allocs more than nextReader method. We want the way to reduce memory alloction for a lot of small packet