https://serverless-stack.com/ logo
#help
Title
# help
s

Sam Hulick

12/20/2021, 9:29 PM
is there any way to speed up this process? something we can do on our end in configuration?
t

thdxr

12/20/2021, 9:32 PM
Is this sst build? or start
s

Sam Hulick

12/20/2021, 9:32 PM
build
deploy, to be specific
t

thdxr

12/20/2021, 9:33 PM
So at the moment...no. This is a quirk with CDK where everything is JS constructor based which means everything is forced to happen synchronously
My plan is to spend some time studying turborepo and see if we can trick CDK to get around this constraint
s

Sam Hulick

12/20/2021, 9:35 PM
got it. I didn’t know CDK bundled/minified JS code.. I thought it was purely IAC?
or is the “Building Lambda function..” something else
t

thdxr

12/20/2021, 9:36 PM
CDK is basically a compile to Cloudformation framework. So it has a "synthesize" step where it compiles your cdk code into cloudformation code. At that point it needs to know where the function assets are so we build it there
@Frank can you think of a way to give CDK a fake function and then replace it at the end? It would allow us to parallel build some of this stuff + take advantage of caching strategies
I guess we could manipulate the raw cloudformation
s

Sam Hulick

12/20/2021, 9:37 PM
I see. sounds tricky
g

gligor

12/20/2021, 9:55 PM
@thdxr isn’t the “fake function” kinda like what serverless framework do when they create stack with S3 bucket only first, then update stack with actual infra included in the stack… Maybe you could do something similar, where you create a “hello world function” then replace, but not sure if it would be faster at all
f

Frank

12/20/2021, 9:56 PM
Totally doable! Yeah, we’d have to manipulate the raw CFN, but that’s pretty straightforward
@thdxr is esbuild taking long in this case? or is the spawning new process part?
g

gligor

12/20/2021, 9:57 PM
one for
v0.55
😉
t

thdxr

12/21/2021, 5:21 AM
@Frank its everything. Spawning one by one + forced to spawn a new node proc
f

Frank

12/21/2021, 9:45 PM
4 Views