serializer: Remove JSON indentation and dict key sorting
Serializing to JSON using “simplejson” is significantly slower when indentation and/or sorting of dictionary keys is used. In simplejson 1.x the difference isn't that big, but with simplejson 2.x the difference can be up to a factor of 7.5. The reason is that the latter no longer uses C functions when sorting or indentation is used. With this patch we revert everything to simplejson's defaults, which should provide us with the best performance available. Signed-off-by:Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
Showing
- daemons/import-export 1 addition, 1 deletiondaemons/import-export
- lib/hypervisor/hv_kvm.py 2 additions, 3 deletionslib/hypervisor/hv_kvm.py
- lib/jqueue.py 1 addition, 1 deletionlib/jqueue.py
- lib/luxi.py 1 addition, 1 deletionlib/luxi.py
- lib/rpc.py 1 addition, 2 deletionslib/rpc.py
- lib/serializer.py 5 additions, 35 deletionslib/serializer.py
- lib/server/noded.py 1 addition, 1 deletionlib/server/noded.py
- lib/server/rapi.py 1 addition, 1 deletionlib/server/rapi.py
- test/ganeti.hypervisor.hv_kvm_unittest.py 1 addition, 1 deletiontest/ganeti.hypervisor.hv_kvm_unittest.py
- test/ganeti.serializer_unittest.py 3 additions, 4 deletionstest/ganeti.serializer_unittest.py
Loading
Please register or sign in to comment