flask icon indicating copy to clipboard operation
flask copied to clipboard

Slow json decoding for huge objects

Open rladeira opened this issue 10 years ago • 2 comments

While doing some tests decoding some huge json objects, I am observing a very slow decoding behavior. Actually, it takes a lot of time to execute request.json the first time.

What's the default json decoder for flask? Does it use some C optimized code?

rladeira avatar May 01 '16 22:05 rladeira

Flask uses the built-in json module, or simplejson if it is available.

davidism avatar May 02 '16 00:05 davidism

Hi. I'm facing the same issue. We want to use orjson instead of simplejson, but I don't know how to implement it and can't really find enough documentation about it.

Could you provide more documentation or an example how to use orjson instead of simplejson / json? It has something to do with "app.json_decoder = ", right?

Machuntox avatar Feb 18 '20 08:02 Machuntox