One reason for slower performance is that we validate the data that the prisma engine gives us using pydantic models. At least providing an option to skip validation would give a decent performance boost.
However, there are a couple concerns with this:
We make use of custom pydantic validators for custom field types
This will break subclass behaviour - Users will no longer be able to subclass models and write custom validators
Suggested solution
Add a config option to disable pydantic validation and if enabled, call BaseModel.construct() instead.
Problem
One reason for slower performance is that we validate the data that the prisma engine gives us using pydantic models. At least providing an option to skip validation would give a decent performance boost.
However, there are a couple concerns with this:
Suggested solution
Add a config option to disable pydantic validation and if enabled, call
BaseModel.construct()
instead.