[Freeipa-devel] [freeipa PR#459][opened] Faster JSON encoder/decoder

tiran freeipa-github-notification at redhat.com
Mon Feb 13 09:07:12 UTC 2017


   URL: https://github.com/freeipa/freeipa/pull/459
Author: tiran
 Title: #459: Faster JSON encoder/decoder
Action: opened

PR body:
"""
Improve performance of FreeIPA's JSON serializer and deserializer.

* Don't indent and sort keys. Both options trigger a slow path in
  Python's json package. Without indention and sorting, encoding
  mostly happens in optimized C code.
* Replace O(n) type checks with O(1) type lookup and eliminate
  the use of isinstance().
* Check each client capability only once for every conversion.
* Use decoder's obj_hook feature to traverse the object tree once and
  to eliminate calls to isinstance().

Closes: https://fedorahosted.org/freeipa/ticket/6655
Signed-off-by: Christian Heimes <cheimes at redhat.com>
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/459/head:pr459
git checkout pr459
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pr-459.patch
Type: text/x-diff
Size: 11973 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20170213/62d23b9e/attachment.bin>


More information about the Freeipa-devel mailing list