{"push_id":1041988624,"size":2,"distinct_size":2,"ref":"refs/heads/master","head":"dc3a0a150dc58af2b9014796807c1a3efc3801c9","before":"2fc20119a436069cd8d8b7858178d1531b727ae8","commits":[{"sha":"0b8b2ac7184ece31000126e93eb0a795aaca99fb","author":{"email":"1fa2ef4755a9226cb9a0a4840bd89b158ac71391@ydekproductions.com","name":"Matt Robenolt"},"message":"Rework our simplejson implementation for performance\n\nFollowing the simplejson source and their documentation, using a default\nkwarg is a bit faster than implementing a subclass of JSONEncoder. We\nalso cache an instance of our encoder instance to prevent simplejson\nfrom taking the slow path and creating a new encoder object on every\ncycle.\n\nThis brings performance of `sentry.utils.json` on par with `simplejson`\nout of the box. Before this change, our performance was twice as slow.\n\nBefore:\n\n  $ python -m timeit -s 'from sentry.utils import json' -s \"data={'foo':'bar'}\" 'json.dumps(data)'\n  100000 loops, best of 3: 6.99 usec per loop\n\nAfter:\n\n  $ python -m timeit -s 'import simplejson as json' -s \"data={'foo':'bar'}\" 'json.dumps(data)'\n  100000 loops, best of 3: 3.96 usec per loop\n  $ python -m timeit -s 'from sentry.utils import json' -s \"data={'foo': 'bar'}\" 'json.dumps(data)'\n  100000 loops, best of 3: 3.81 usec per loop\n\nLastly, while in here, simplejson has a built in HTML encoder version to\nproperly escape output with JSONEncoderForHTML.","distinct":true,"url":"https://api.github.com/repos/getsentry/sentry/commits/0b8b2ac7184ece31000126e93eb0a795aaca99fb"},{"sha":"dc3a0a150dc58af2b9014796807c1a3efc3801c9","author":{"email":"1fa2ef4755a9226cb9a0a4840bd89b158ac71391@ydekproductions.com","name":"Matt Robenolt"},"message":"Merge pull request #2932 from getsentry/simplejson\n\nRework our simplejson implementation for performance","distinct":true,"url":"https://api.github.com/repos/getsentry/sentry/commits/dc3a0a150dc58af2b9014796807c1a3efc3801c9"}]}