Skip to content

Generation is taking >4 minutes for a schema with 400 models #472

@cb-vigneshsm

Description

@cb-vigneshsm

Describe the Bug
Generator typegraphql-prisma is taking >4 minutes compared to prisma client for a schema with >400 models while prisma client takes just under 1-2 seconds. Is this expected behaviour ?

To Reproduce
Run npx prisma generate on a schema with lot of models with below generator

generator typegraphql {
  provider           = "typegraphql-prisma"
  useOriginalMapping = "true"
}

Expected Behavior
I would expect it to be taking just a few seconds to generate everything.

Logs

prisma:GeneratorProcess prisma:getDMMF Using getDmmf Wasm +2743ms +419ms
prisma:GeneratorProcess prisma:getDMMF Using given datamodel +0ms +1ms
prisma:GeneratorProcess prisma:getDMMF dmmf data retrieved without errors in getDmmf Wasm +799ms +798ms
prisma:cli:bin Execution time for executing "await cli.parse(commandArray)": 413122.55179190636 ms +408315ms

✔ Generated Prisma Client (v5.20.0) to ./../node_modules/@prisma/client in 1.68s

✔ Generated TypeGraphQL integration to ./../node_modules/@generated/type-graphql in 409.73s

Environment (please complete the following information):

OS: Mac M3

"@prisma/client": "^5.20.0",
"prisma": "^5.20.0",
"ts-node": "^10.9.2",
"type-graphql": "^2.0.0-rc.2",
"typegraphql-prisma": "^0.28.0"

Additional Context
Saw the same issue as closed here - Issue
I have tried the steps mentioned here but have not been able to bring the time down

Appreciate any help here , thanks in advance !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions