-
Notifications
You must be signed in to change notification settings - Fork 15
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
Remove simplejson dependency #23
Comments
Hrm. python 2.7 improved the performance of the stdlib json serialiser, but it did not integrate all of the optimisations from I'd therefore be reluctant to simply discard simplejson without further benchmarking. I'd be open to dropping the dep on simplejson if it could be shown that on recent (say, python 3.5) versions of the stdlib the performance was comparable with I'd also consider making the dependency optional, but am wary of introducing strange effects like that seen in https://github.com/kennethreitz/requests/issues/3052. I'm not quite clear on what problem you're trying to solve: is |
I guess a final option would be to use |
No, the problem we experience is ultimately to blame on https://github.com/kennethreitz/requests/issues/3052 -- when trying to handle parsing exceptions, we mismatch on the exception type, because Unfortunately it doesn't look like https://github.com/kennethreitz/requests/pull/3056 will ever make it into the
Allowing |
According to https://artem.krylysov.com/blog/2015/09/29/benchmark-python-json-libraries/
That sounds like a good solution, keeping the option to use |
I looked at those metrics when I did the benchmarking I referred to earlier. What I found is that the performance of the various json libraries varied dramatically according to other options. In particular, stock
Isn't this what |
@palango any further thoughts here? |
hrm, I did some benchmarking (based https://github.com/richvdh/json_benchmark). using python 3.7.5 (seconds per loop):
So yeah, we should probably switch back to stock |
it seems like there was a substantial change to the performance of the stdlib |
as per the benchmarks on #9, this would also allow us to remove the |
An update on the situation here: as of #25, it is possible to use stdlib json rather than simplejson for encoding; however, we still pull it in with Properly dropping the |
Looks like this issue was closed in #60? |
Currently the package pulls
simplejson
as a dependency.This caused some unexpected trouble in raiden-network/raiden#4174 . It also seems that since python 2.6
simplejson
is no longer a big performance gain: https://github.com/kennethreitz/requests/issues/3052#issuecomment-197021335So my idea would be to remove the dependency. If you agree I can create a PR.
The text was updated successfully, but these errors were encountered: