How are you serializing the pydantic objects this fast? #931
Unanswered
AbbasCiatek
asked this question in
Question
Replies: 1 comment
-
I guess you should attach your test code. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm very puzzled by the fact that when I try to serialize the same pydantic object from a dict, its making 2-3 times as much time as me getting the form from the db directly which is super weird
Time to get form from cache: 2.071380615234375 ms
Time to json load form: 4.654407501220703 ms
Time to instantiate form: 74.60212707519531 ms
Time to get form from db: 24.610519409179688 ms
others: 1.863718032836914 ms
Total time to get form: 107.85889625549316 ms
even when trying to duplicate your setup:
form = cast(AbstractFormDocument, parse_obj(AbstractFormDocument, dict_cache))
are you doing something special ?
Beta Was this translation helpful? Give feedback.
All reactions