-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance: Prisma generate freezes with large schema with dbml generator #38
Comments
@PabloSzx let's track the performance issue here. We should setup a large dummy/test schema to find out the bottleneck of this generator. How large (lines of code) is the |
Is ~650 lines |
Think I have another instance of this, my schema is ~400 lines long, with many enums peppered all over which I think is affecting graph complexity. |
@yourbuddyconner is it freezing or just taking for a long time to generate? I guess will need to create a test schema with lots of entries, relationships and enums to test it out. |
I feel like it was hanging, I profiled the process and it wasn't using a considerable amount of CPU or memory, so my conclusion was a weird hang of some kind but that wasn't based on a deep dive or anything. I am using a schema generated by Prisma, which includes an average of ~1 enum across 20+ models with a web of relations across them. The enums have <10 options, averaging 2-4, and idk if that affects performance at all. Anecdotally, I have been having difficulty generating ERDs with this schema across a variety of tools, with the only reliable one being PGAdmin. Prisma might be using some fancy Postgres stuff that is specific to a newer version of PSQL. |
there seems to be another issue that isn't caught by the tests, because when generating in a reasonably sized project it's frozen, when removing the dbml generator provider it does generate correctly
Originally posted by @PabloSzx in #37 (comment)
The text was updated successfully, but these errors were encountered: