[requirements][placement] orjson instead of stdlib json
For the past few months we've been doing profiling of placement,
modeling large clouds where many results (7000 resource providers)
will be returned in response to common requests.
One of the last remaining chunks of slowness is serializing the very
large dicts representing those providers (and associated allocation
requests) to JSON (greater than 100k lines when pretty printed).
Using the oslo jsonutils (which is a light wrapper over the stdlib
'json' module) approximately 25% of time is consumed by dumps().
Using orjson  instead, time consumption drops to 1%, so this is
something it would be good to make real in placement (and perhaps
other projects that have large result sets). There's a WIP that
demonstrates its use at .
I'm posting about it because JSON serialization seems like it might
be an area that the requirements team has greater interest than some
Also, orjson is only Python 3, so use needs to be adapted for Python
2, as shown in the WIP .
Otherwise it's fine: active, Apache2 or MIT license.
Chris Dent Ù©â??Ì¯â??Û¶ https://anticdent.org/