Open marcjulian opened 2 years ago
@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 prisma.schema
where it froze?
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? Are thus enums with a few or a lot of entries?
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 https://github.com/notiz-dev/prisma-dbml-generator/issues/37#issuecomment-1174157553