You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey!
There are calls of pydantic.main.validate_model in search queries.
It is very CPU-loaded operations. And especially it affects when there are huge models and queries returning many objects. It is not necessary to validate objects in search queries, just while creating and updating.
Can you please remove it or add some setting to avoid it?
For me qfix is: redis_om.model.model.RedisModel.validate_primary_key = lambda x: True pydantic.main.validate_model = lambda x, y: (y, set(y.keys()), False)
The text was updated successfully, but these errors were encountered:
Hey!
There are calls of
pydantic.main.validate_model
in search queries.It is very CPU-loaded operations. And especially it affects when there are huge models and queries returning many objects. It is not necessary to validate objects in search queries, just while creating and updating.
Can you please remove it or add some setting to avoid it?
For me qfix is:
redis_om.model.model.RedisModel.validate_primary_key = lambda x: True
pydantic.main.validate_model = lambda x, y: (y, set(y.keys()), False)
The text was updated successfully, but these errors were encountered: