Nickolas Grigoriadis
Nickolas Grigoriadis
I expect it will scale nearly linearly, the DB is only 1.5% of the execution time... Also, i'm very aware of how the event loop is susceptible to long-running sync...
To Victor (your message disappeared here?) I manually removed the validation code in FastAPI for this test purposes... It does seem that we might want to consider forcing validation off...
@victoraugustolls vmprof + a local vmprof-server. I find vmprof is one of the easiest profilers to use. py-spy has slightly higher resolution, but requires more setup and the result isn't...
I had an attempt at #1434 But it seems that by skipping `jsonable_encoder` I need to know if I use the prepared, or validated response object. What I mean by...
Oh, you mean you didn't specify a `response_model`? Yes, that case doesn't even have validation. Good point, I'll ensure that happens as well :+1:
@acnebs Oh dear. My example tried to serialise `Decimal` and orjson *doesn't* support that? So it's missing one of my more common datatypes. So we can't make this automatic. So...
Seems we can't specify a JSON override for unsupported types like in stdlib's. Would love to be able to do something like this: https://github.com/django/django/blob/master/django/core/serializers/json.py#L77
Possibly `python-rapidjson` would be a good compromise: https://python-rapidjson.readthedocs.io/en/latest/dumps.html We can use a `default()` hook to handle unsupported cases, and it supports a fair amount of extra stuff natively (uuid, decimal,...
How did I miss that in the docs? It works, and will be part of #1434 Although it loses accuracy on Decimal (I had to let it return as a...
Yup, I did this in the linked PR: https://github.com/tiangolo/fastapi/pull/1434/files#diff-f5a428b2dd894bf2a31f0e8020faa3e8R19-R31