Rust-Free Is 3x Slower
Has this been already reported? On a local Postgres database I was getting a massive number of transaction timeout messages running out seed script. Ended up with this config to avoid those.
Rust + Non-ESM - Seeding Complete in 166.956seconds
Rust + ESM - Seeding Complete in 149.892 seconds
Rust Free + ESM - Seeding Complete in 557.726 seconds
Thats from just changing
to this
and running
npx prisma generate before the seed script.
Our seed script uses functions from our application code, with seed data and some use of fakerjs. That is a lot of prisma upsert statements with deep nesting, and deep returns. That we then run synchronously with Promise.all([..]);1 Reply
You opted for speed from this bot. Let's conjure up an answer right now!
Yes, this issue has been reported by other users. There are multiple reports of transaction timeouts and performance regressions when switching to the Rust-free (TypeScript-based) Prisma ORM, especially during operations involving many transactions or complex, deeply nested queries. Some users specifically noted a spike in "Unable to start a transaction in the given time" errors and much slower seed scripts after moving to the Rust-free engine, even with increased transaction timeouts and connection pool adjustments. Rolling back to the Rust engine resolved these issues for them. The problem seems to be more pronounced with heavy transaction workloads and deep upserts, similar to your use case. The Prisma team is aware and investigating, but as of now, these issues persist for some users on the latest versions of the Rust-free engine Spike in
Unable to start a transaction in the given time. for new prisma-client.
It's worth noting that, in general, benchmarks show the Rust-free engine is faster for large data retrieval queries, but for some transaction-heavy or complex write scenarios, users have observed significant slowdowns or timeouts compared to the Rust engine. The team is actively working on improvements, but for now, if your workload is heavily transaction-bound, you may want to continue using the Rust engine until these issues are resolved Prisma ORM without Rust: Latest Performance Benchmarks.
✅ Great, thanks for letting us know that this solved your question!