)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"765a67129de5ae46e1e31b40791711133d8549d0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"107c61fe_9997bc36","updated":"2024-05-16 20:01:17.000000000","message":"Alternate (maybe slightly crazier) idea: https://review.opendev.org/c/openstack/swift/+/919897","commit_id":"76ff1ddadc5d8ac7698dc5c5ca5c1bb930a036c8"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"025a4e1928957d173f7dbbd1076da7ed0fe660f3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"5f59d015_3add6799","updated":"2022-07-25 06:26:27.000000000","message":"Seems py2 doesn\u0027t have the JSONDecodeError either, so needs to be a ValueError. \n\norjson also doesn\u0027t put a space after the \u0027:\u0027. So there is probably still a bit of work. Adding:\n\n  from __future__ import absolute_import\n  \nWould hopefully be enough to at least do some benchmarking and see if this is worth while or not.","commit_id":"76ff1ddadc5d8ac7698dc5c5ca5c1bb930a036c8"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"3515f2eb8d4fec4928874ef11c34adc024d174df","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"deef8aa0_f0118d33","updated":"2022-07-22 07:37:31.000000000","message":"This is just to see how this might come out. And so we can benchmark","commit_id":"76ff1ddadc5d8ac7698dc5c5ca5c1bb930a036c8"}],"swift/common/json.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1e11cdc64765f38c34a380ceb5d749e196a10029","unresolved":true,"context_lines":[{"line_number":18,"context_line":"    import orjson as _json"},{"line_number":19,"context_line":"    ORJSON_SUPPORTED \u003d True"},{"line_number":20,"context_line":"except ImportError:"},{"line_number":21,"context_line":"    import json as _json"},{"line_number":22,"context_line":"    ORJSON_SUPPORTED \u003d False"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"d0aff5fa_8947df3f","line":21,"updated":"2022-07-22 23:10:19.000000000","message":"We might need to rename our module -- on py2, this apparently imports this same module again :-/","commit_id":"76ff1ddadc5d8ac7698dc5c5ca5c1bb930a036c8"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"025a4e1928957d173f7dbbd1076da7ed0fe660f3","unresolved":false,"context_lines":[{"line_number":18,"context_line":"    import orjson as _json"},{"line_number":19,"context_line":"    ORJSON_SUPPORTED \u003d True"},{"line_number":20,"context_line":"except ImportError:"},{"line_number":21,"context_line":"    import json as _json"},{"line_number":22,"context_line":"    ORJSON_SUPPORTED \u003d False"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fe48034e_0e60841d","line":21,"in_reply_to":"d0aff5fa_8947df3f","updated":"2022-07-25 06:26:27.000000000","message":"sigh, damn you py2. After a bit of research on this, seems py2 don\u0027t use absolute imports by default, unlike py3, so just need to add:\n\n  from __future__ import absolute_import\n\nSo will do that for now. Another thing we wont have to worry aout when we\u0027re full py3.","commit_id":"76ff1ddadc5d8ac7698dc5c5ca5c1bb930a036c8"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"10a61243eb1888b503d8d91e66fa431ead861240","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    ORJSON_SUPPORTED \u003d False"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def dumps(data, ensure_ascii\u003dTrue, sort_keys\u003dFalse, indent\u003dNone, **kwarg):"},{"line_number":26,"context_line":"    if ORJSON_SUPPORTED:"},{"line_number":27,"context_line":"        opt \u003d _json.OPT_NON_STR_KEYS"},{"line_number":28,"context_line":"        if sort_keys:"}],"source_content_type":"text/x-python","patch_set":1,"id":"f31c5037_4aae22c5","line":25,"updated":"2022-07-28 20:55:32.000000000","message":"Also benchmarked this MR using swift-bench, didn\u0027t see noticeable improvement though, but mainly due to swift-bench doesn\u0027t cover the test cases we need for this MR.","commit_id":"76ff1ddadc5d8ac7698dc5c5ca5c1bb930a036c8"},{"author":{"_account_id":34930,"name":"Jianjian Huo","email":"jhuo@nvidia.com","username":"jhuo"},"change_message_id":"10a61243eb1888b503d8d91e66fa431ead861240","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    ORJSON_SUPPORTED \u003d False"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def dumps(data, ensure_ascii\u003dTrue, sort_keys\u003dFalse, indent\u003dNone, **kwarg):"},{"line_number":26,"context_line":"    if ORJSON_SUPPORTED:"},{"line_number":27,"context_line":"        opt \u003d _json.OPT_NON_STR_KEYS"},{"line_number":28,"context_line":"        if sort_keys:"}],"source_content_type":"text/x-python","patch_set":1,"id":"c04e93b9_6b629065","line":25,"updated":"2022-07-28 20:55:32.000000000","message":"Benchmarked this implementation against plain orjson dumps, the \"ensure_ascii\" conversion did slow down the encoding (from 9s to 14s for the test, ~1.6X slower), but still much faster than standard json (51s, ~3.6X faster). This is good, patch is fast enough while it also ensures compatibility.","commit_id":"76ff1ddadc5d8ac7698dc5c5ca5c1bb930a036c8"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1e11cdc64765f38c34a380ceb5d749e196a10029","unresolved":true,"context_lines":[{"line_number":40,"context_line":"        return result"},{"line_number":41,"context_line":"    else:"},{"line_number":42,"context_line":"        return _json.dumps(data, ensure_ascii\u003densure_ascii,"},{"line_number":43,"context_line":"                           sort_keys\u003dsort_keys, indent\u003dindent, **kwarg)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"def loads(data):"}],"source_content_type":"text/x-python","patch_set":1,"id":"421f82e5_fd7f1ab8","line":43,"updated":"2022-07-22 23:10:19.000000000","message":"...making this start throwing recursion errors.","commit_id":"76ff1ddadc5d8ac7698dc5c5ca5c1bb930a036c8"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"025a4e1928957d173f7dbbd1076da7ed0fe660f3","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        return result"},{"line_number":41,"context_line":"    else:"},{"line_number":42,"context_line":"        return _json.dumps(data, ensure_ascii\u003densure_ascii,"},{"line_number":43,"context_line":"                           sort_keys\u003dsort_keys, indent\u003dindent, **kwarg)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"def loads(data):"}],"source_content_type":"text/x-python","patch_set":1,"id":"505f28fa_de1f15e5","line":43,"in_reply_to":"421f82e5_fd7f1ab8","updated":"2022-07-25 06:26:27.000000000","message":"Done","commit_id":"76ff1ddadc5d8ac7698dc5c5ca5c1bb930a036c8"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1e11cdc64765f38c34a380ceb5d749e196a10029","unresolved":true,"context_lines":[{"line_number":63,"context_line":"    return _json.load(fd)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"def dump(data, fd):"},{"line_number":67,"context_line":"    if ORJSON_SUPPORTED:"},{"line_number":68,"context_line":"        fd.write(dumps(data))"},{"line_number":69,"context_line":"        fd.flush()"}],"source_content_type":"text/x-python","patch_set":1,"id":"93220744_18362ac8","line":66,"range":{"start_line":66,"start_character":15,"end_line":66,"end_character":17},"updated":"2022-07-22 23:10:19.000000000","message":"Might need to check whether this was opened in text or binary mode.","commit_id":"76ff1ddadc5d8ac7698dc5c5ca5c1bb930a036c8"}]}
