[6.7.0] Slow client generation and call to getDMMF()

We recently upgraded to 6.7.0 and noticed that generation of the new typescript prisma client is very slow as well as the call to getDMMF(). This is the output of running db push:
PS C:\git\FusionHub> pnpm prisma db push
Loaded Prisma config from "C:\git\FusionHub\prisma.config.ts".
Prisma config detected, skipping environment variable loading.
Prisma schema loaded from prisma
Datasource "db": PostgreSQL database "fusionhub", schema "public" at "localhost:5432"

Your database is now in sync with your Prisma schema. Done in 444ms

Running generate... - node --experimental-strip-types ./scripts/prisma-zod/prismaZodGenerator.ts
Generating zod schemas
Formatting output
✔ Generated Prisma Client (6.7.0) to .\src\generated\prisma in 53.22s
✔ Generated node --experimental-strip-types ./scripts/prisma-zod/prismaZodGenerator.ts to .\..\src\prisma-zod in 446.98s
PS C:\git\FusionHub> pnpm prisma db push
Loaded Prisma config from "C:\git\FusionHub\prisma.config.ts".
Prisma config detected, skipping environment variable loading.
Prisma schema loaded from prisma
Datasource "db": PostgreSQL database "fusionhub", schema "public" at "localhost:5432"

Your database is now in sync with your Prisma schema. Done in 444ms

Running generate... - node --experimental-strip-types ./scripts/prisma-zod/prismaZodGenerator.ts
Generating zod schemas
Formatting output
✔ Generated Prisma Client (6.7.0) to .\src\generated\prisma in 53.22s
✔ Generated node --experimental-strip-types ./scripts/prisma-zod/prismaZodGenerator.ts to .\..\src\prisma-zod in 446.98s
// main.prisma
generator client {
provider = "prisma-client"
binaryTargets = ["native", "debian-openssl-3.0.x"]
previewFeatures = ["relationJoins"]
output = "../src/generated/prisma"
}
// main.prisma
generator client {
provider = "prisma-client"
binaryTargets = ["native", "debian-openssl-3.0.x"]
previewFeatures = ["relationJoins"]
output = "../src/generated/prisma"
}
Not only does the actual generation take close to a minute, but we have a custom generator that generates some prisma enum types to zod schemas, and this custom generator uses getDMMF from @prisma/internals and waiting for it to return is the majority of the 446 seconds. Can something be done to make it go faster?
1 Reply
Prisma AI Help
You chose to debug with a human. They'll tinker with your query soon. If you get curious meanwhile, hop into #ask-ai for a quick spin!

Did you find this page helpful?