Hi everyone, I noticed that my server takes 7-8s t...
# orm-help
a
Hi everyone, I noticed that my server takes 7-8s to load (and it's pretty new). Narrowed it down to
import { PrismaClient } from '@prisma/client'
taking a whooping 6 seconds. Is this something you plan to optimize? anything I could do about it? It's a new project with just 8 tables/models at the moment.
⚠️ 1
j
That sounds very wrong, that should take a few ms at most.
Can you create an issue with a reproduction?
If you can reproduce this, we would certainly look into it.
(Even though server startup of course usually is not such an important concern)
a
Ok I will
Here is the culprit and it scales with dependencies:
Copy code
const dirname = findSync(process.cwd(), [
  '"node_modules/.prisma/client"',
  '".prisma/client"',
], ['d'], ['d'], 1)[0] || __dirname
Will investigate further
This reproduces it, just by adding all my dependencies. Will submit as an issue to Prisma https://github.com/flesler/prisma-boot-test
@janpio here, could you try to get this reviewed asap? thanks https://github.com/prisma/prisma/issues/8178