There's plenty of articles on how to set up firebase functions with nestjs, and I've been developing this for about a month now on my local machine. Finally, it was time to release. I used a combination of nestjs and mikro orm to handle my server and database layer, with 12 entities and around 20 routes. Everything ran smooth as butter locally.
However, in a firebase functions environment (defaults) where you have 256mb of RAM and god knows how much vCPU, suddenly my cold start + 30ish seconds of nest spinning up, it meant that it's no longer a production ready environment. In contrast, express spun up in around 500ms + cold start time.
Here's a few log screenshots to show the time each step took:
Could I have architected my application incorrectly or is Nest just that slow in tiny environments? I can't imagine lazy loading would help, and im auto discovering entities for mikro orm. Is there anything I can try to speed up the process or does anyone have any experience with nestjs in firebase functions?