Closed baptistemanson closed 1 year ago
Some progress; a custom folder outside out of the node_modules brings the performance to some acceptable performance. ✔ Generated TypeGraphQL integration to .\src\server\middlewares\graphql in 574ms for the large model ✔ Generated TypeGraphQL integration to .\src\server\middlewares\graphql in 6.15s
On my machine with such schema: https://github.com/MichalLytek/typegraphql-prisma/blob/main/experiments/postgres/prisma/schema.prisma
✔ Generated Prisma Client (4.15.0 | library) to ./prisma/generated/client in 83ms
✔ Generated TypeGraphQL integration to ./prisma/generated/type-graphql in 2.43s
As stated in the docs, emitting to node_modules
does transpilation of the generated TS code on the fly, that's why it's so slow.
Im glad we got a chance to find the solution and document it for future users. As I use tsx now, I forgot transpilation with ts-node was so slow! Thanks for trying to run it too Michal, I appreciate.
I will close the bug.
Describe the Bug With one model, I get ✔ Generated Prisma Client (4.15.0 | library) to .\node_modules\@prisma\client in 53ms ✔ Generated TypeGraphQL integration to .\node_modules\@generated\type-graphql in 69.38s
When testing with a larger schema (19 models) it takes 90-100s.
To Reproduce
Expected Behavior We would expect to be just a few seconds.
Environment (please complete the following information):
typegraphql-prisma
version 0.26We were also able to reproduce this issue with a macOS M1 environment.
Have a great day! Tell me how I can help beyond funding (because broke for now)