I haven't written benchmarks yet but it is something I am working on. The reason that performance is mentioned in the README is that I haven't spent time on improving it yet.
The biggest blockers in terms of performance are:
- Communication with the internal Rust engine is performed over HTTP instead of FFI.
- You cannot select a subset of fields (every scalar field in a model is selected)
- You cannot skip pydantic validation which while fast is unnecessary in some cases
With that said Prisma Python should be reasonably fast but I would expect it to be on the lower end of the spectrum compared to other Python ORMs. I have ran some load tests locally and creating 500,000 records took about 90 seconds.
Prisma uses rust for two main reasons from what I understand. 1) to keep the engine portable and maximize code reuse, to make projects like this Python adapter possible for example 2) under the hood Primsa does not use joins. It does a waterfall of queries (but not n+1), then stitches the data together in memory, which happens in the rust engine for performance reasons
Question: The Readme says there's room for massive improvement in performance. What's the performance like right now? Any benchmarks?