What's everyone's SST build/deploy performance lik...
# sst
r
What's everyone's SST build/deploy performance like? The reason I ask is that I have a TypeScript project with 11 functions in it (all but one tied to HTTP API routes, the other an eventbridge cron) and when running
sst deploy
it seems to take longer than it should. Running
tsc
on the entire project takes about 10s I feel like the Building Lambda function /src/somePath/func.handler stage takes longer than it should. For this project to get from the running
sst deploy
to Deploying Stacks takes 11 minutes.
f
Hey @Ross Coundon oh you mean it takes 11min before it starts to deploy stacks?
r
Yeah
f
Hmm it’s a few seconds for me. Can you DM me ur .build/sst-debug.log? Let me take a look when I’m get back to my MacBook.
r
Thanks Frank
Just to report back, the slowdown was because we were specifying a nodeModules entry (epsagon) in defaultFunctionProps. Frank pointed out that this means a package.json is created for each function with that package in it and npm install run for each function which was what was causing the long build times. As it turns out it's no longer necessary to do this for Epsagon (it was when we started using it) so our solution was to remove the nodeModules entry altogether. However, if you have something specified there, be aware that builds will take a bit longer.
f
Yup. And we have an open issue to optimize the handling for the
nodeModules
entry. Let me know if anyone need this. https://github.com/serverless-stack/serverless-stack/issues/668