-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Migrate to use jsoniter instead of encoding/json #14841
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
Conversation
Signed-off-by: Andrew Thornton <art27@cantab.net>
for |
that's not initing - it's just a reference |
This also needs chi to migrate to jsoniter too. |
@zeripath I think you can update our binding middleware here ... ... done |
|
we need benchmarks for gitea!!! |
@silverwind we only need to care about the incompatibilities that actually matter - if we're not hitting anything right now it's easy enough to handle in the future. Not wedded to json-iterator though - looking at the code it certainly could be a lot faster. My main reason was that it had a streaming interface but its API is not great. Happy to try go-json if you think that's better. |
iterator is is opensource why not improve it upstream ... & this are now topics witch we should talk about in discord ... locking this issue now :D |
So in regards to JSON libraries our testsuite as a whole is actually a rather good benchmark. It would be useful though to have a benchmark that just pushes files to a repo over the API as I know that that is something we're surprisingly slow at. |
encoding/json
is slow.jsoniter
is faster.jsoniter
also has a streaming interface which we can improve other parts e.g.routers/api/v1/repo/file.go
Signed-off-by: Andrew Thornton art27@cantab.net