We are utilizing the NodejsFunction construct to build out our Nodejs bundles for lambda. We have services with up to 20 functions. The build time on these stacks is long. We are considering going back to Webpack so we can group all of the entries into a single build and save a load of time. We have also found that parcel's cache is helping very minimally. These build times effect our tests as well, which makes it much harder to endure.
Is there a way to combine Parcel builds? Or generally speed up build times?
Asked the question on Gitter. Someone recommended splitting up our stacks. This could help when making small changes but it also increases complexity a lot and in the end all will be run anyways.
I've noticed the same thing, see also: https://github.com/aws/aws-cdk/issues/10286
I just tested https://github.com/floydspace/aws-lambda-nodejs-esbuild (which uses the esbuild packages), and it seems to be magnitudes faster than the current Parcel implementation.
Any chance we can bring this to AWS CDK core?
Hey @quantumew,
After reviewing both issues, it seems like you are doing everything correctly within the currently available constructs, so this is really a bug report about poor performance of the aws-lambda-nodejs. So I am going to call this a duplicate of #10286 as mentioned by @jaapvanblaaderen.
If you disagree with the assessment, feel free to reopen the issue and say why its different.
If you are not the OP and are tracking this, please upvote the linked issue so we push it higher in priorities!
馃樃 馃樂
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
Most helpful comment
I've noticed the same thing, see also: https://github.com/aws/aws-cdk/issues/10286