-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
String overhead #121
Comments
I think strings usage in
See https://github.com/go-redis/redis/blob/master/parser.go#L20 for details. But if you have large
|
As for the API I think that default should be |
That API sounds good to me. Your'e right, there is no real use-case for |
Soo, this is something I wanted to discuss a long time ago, now that you have started working on #118, I think it's the right time. The client is currently using strings for arguments across the board. These strings are then converted to
[]byte
and sent across the wire. Responses are received as byte streams and then converted (mostly) to strings again. This is quite inefficient if you are dealing with larger objects at higher frequency as it causes many allocations and therefore GC overhead. I was wondering if it would be sensible to implement most command methods using low-overhead []byte and then haveMethodNameString
/MethodNameValue
accessors. Example:Alternatively:
I don't know how valuable this would be for everyone else, but it would make a huge difference for us.
The text was updated successfully, but these errors were encountered: