-
Notifications
You must be signed in to change notification settings - Fork 318
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
should encoder and decoder object be shared or created on demand? #534
Comments
Encoder or decoder is mostly used for streaming or some specific configurations, such as decoder with |
good to know that, I was about to use encoder for streaming io as mentioned in https://github.com/bytedance/sonic#streaming-io , no specific configuration, just http write response. is it recommended to simplely use The reason I am asking is I noticed very similar performance os sonic encoder vs json encoder in my test and I am curious if I did something wrong |
yes, if not in streaming scenes or specific configuration, just use |
It's unclear from documentation what's the best practice to use encoder and decoder.
Should I keep a global encoder ? is the object thread-safe?
Thanks
The text was updated successfully, but these errors were encountered: