Hey guys, with SST lambda cold start (in debug mod...
# sst
s
Hey guys, with SST lambda cold start (in debug mode) takes too much time... Is there a plugin like serverless-optimize available for SST?
t
By debug mode do you mean you're attaching vscode debugger? Or just running in local mode
d
I believe this is built in, it just uses ESBuild instead of Babel. You can just set
minify
to
true
. Basing this answer on https://github.com/serverless/serverless-optimizer-plugin
s
@Derek Kershner Thanks... Lemme try that.
@thdxr, local mode
t
And is it slow on the first invocation and faster after? Or just slow always
s
it is slow in the first invocation and then faster after...
minify is defaulted to true. I am just building the notes demo app and running it in local mode. The first time i launch it takes > 15 sec. Any suggestions? @thdxr, @Derek Kershner?
d
Dax is likely to ask how big your lambda is.
t
^ yes haha but if it's just the notes app it should be normal. Hmm can you send me you .build/debug log
d
@Samir Baid, are you on the newest version? I had a similar symptom a few versions ago.
s
@Derek Kershner i am using cli version 0.54.4
i dont know what happened, but i deleted the entire stack (had to delete dynamoDB and S3 manually) and redeployed. Now things look much better
@Derek Kershner, @thdxr it is happening again. Apparently when the stack is deployed from scratch things are faster, but if we add new lambdas to existing stack cold start becomes bad... This time took 17.58 sec
t
Hey Samir what version are you on
s
"@serverless-stack/cli": "0.54.4",     "@serverless-stack/resources": "0.54.4",
SST?
t
can you try going to latest?
are you on windows btw?
s
yes.. i am on windows
u mean 0.55.1?
switching to 0.55.1 seems to have done the trick... Now things are fast again... i'll do some more tests and if i see concerns will let u guys know... Thanks a lot for helping out
f
@Samir Baid Ah nice. This sounds like an issue we fixed in 0.55.0!
You should be good 🤓 But let us know if you run into this again.