Is anyone else suffering long cold starts when usi...
# general
m
Is anyone else suffering long cold starts when using the Prisma ORM?
b
It's a known issue with Prisma https://github.com/prisma/prisma/issues/4972.
m
I created a couple more tickets with some detailed profiling and feedback. https://github.com/prisma/prisma/issues/10724 and https://github.com/prisma/prisma/issues/11266
Commenting there might help motivate them. Their head of eng is monitoring it
t
I've done a lot of research on this
Prisma architecture isn't serverless friendly due to the giant binaries they need to ship
Only resolution is to use Prisma data proxy. This is why we've been recommending kysely over Prisma
m
the binaries aren't the whole story though. i have a nice lambda layer with prisma engine setup. at least part of the problem is the 6MB of JSON data describing my schema that it has to parse
t
Lambda layers don't decrease coldstart
m
no but I don't know if the binaries are such an issue now. they're in rust. the layer solves having a bunch of lambda bundles that are a hundred megs
t
The layer still needs to be downloaded on every cold start of each lambda function. The giant DMMF file is also an issue
m
yeah I have been profiling and reporting details on those tickets
t
But ultimately as long as they have to ship large rust binaries coldstarts are an issue. I've seen differences from 10mb to 1mb let alone 100mb+
m
yeah it is a problem.