Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lambda-nodejs] Multiple Parcel Builds Long Build Times #10589

Closed
quantumew opened this issue Sep 29, 2020 · 4 comments
Closed

[lambda-nodejs] Multiple Parcel Builds Long Build Times #10589

quantumew opened this issue Sep 29, 2020 · 4 comments
Assignees
Labels
@aws-cdk/aws-lambda-nodejs duplicate This issue is a duplicate. guidance Question that needs advice or information.

Comments

@quantumew
Copy link
Contributor

❓ General Issue

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.

The Question

Is there a way to combine Parcel builds? Or generally speed up build times?

Environment

  • CDK CLI Version: 1.64.1
  • Module Version: 1.64.1
  • Node.js Version: v12.18.3
  • OS: OSX
  • Language (Version): 4.0.2
  • Parcel version: 2.0.0-beta.1

Other information

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.

@quantumew quantumew added guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Sep 29, 2020
@SomayaB SomayaB changed the title @aws-cdk/aws-lambda-nodejs - Multiple Parcel Builds Long Build Times [lambda-nodejs] Multiple Parcel Builds Long Build Times Sep 29, 2020
@jaapvanblaaderen
Copy link
Contributor

I've noticed the same thing, see also: #10286

@Dzhuneyt
Copy link
Contributor

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?

@NGL321 NGL321 added duplicate This issue is a duplicate. and removed needs-triage This issue or PR still needs to be triaged. labels Oct 28, 2020
@NGL321
Copy link
Contributor

NGL321 commented Oct 28, 2020

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!

😸 😷

@NGL321 NGL321 closed this as completed Oct 28, 2020
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda-nodejs duplicate This issue is a duplicate. guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

5 participants