[ovs-dev] [PATCH 2/3] Add optional C extension wrapper for Python JSON parsing

Ben Pfaff blp at ovn.org
Tue Jun 7 15:35:49 UTC 2016


On Tue, May 31, 2016 at 07:14:51PM -0500, Terry Wilson wrote:
> The pure Python in-tree JSON parser is *much* slower than the
> in-tree C JSON parser. A local test parsing a 100Mb JSON file
> showed the Python version taking 270 seconds. With the C wrapper,
> it took under 4 seconds.
> 
> The C extension will be used automatically if it can be built. If
> the extension fails to build, a warning is displayed and the build
> is restarted without the extension.
> 
> The Serializer class is replaced with Python's built-in
> JSON library since the ability to process chunked data is not
> needed in that case.
> 
> The extension should work with both Python 2.7 and Python 3.3+.

Missing Signed-off-by.



More information about the dev mailing list