Track prisma engine binary size
See original GitHub issueProblem
Over prisma 2’s lifespan, the binary size of the bundled engines has been increasing at a steady rate as new features are added. query-engine-debian-openssl-1.1.x
went from ~12mb around preview.10, to 24 at 2.11
, to now 38mb with 2.20.1
and napi enabled. While this is usually not a problem in traditional server environments it’s becoming increasingly troubling in a serverless environment, where the bundled .zip
need to stay below a certain size.
Suggested solution
I’d like to propose to add an internal monitoring of the binary size, and maybe dedicating some time into thinking how we could reduce it. I hope that moving napi to stable can reduce some engine networking code and dependencies, and maybe having more finegrained builds with or without certain features ( no need to bundle a sqlite adapter when only postgres support is needed) could help as well, though I’m not sure how technically feasible that is.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:5 (3 by maintainers)
Top GitHub Comments
Any chance of reviving this? I think 40MB is excessive and it without knowing the complexities of reducing it I’m hoping that it can be reduced anyway by a large margin.
I think the differences between Azure and AWS here are huge, AWS on this front download size doesn’t seem like too much of a factor to cold start on AWS but on Azure we’re seeing like 7s cold starts with serverless applications on consumption plans that basically just have prisma and a few other dependencies compared to like 150-200ms without.
@janpio thanks, it’s in the chain above.