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

aws-cdk-lib: incremental build takes a few minutes every time #25255

Closed
tmokmss opened this issue Apr 23, 2023 · 5 comments
Closed

aws-cdk-lib: incremental build takes a few minutes every time #25255

tmokmss opened this issue Apr 23, 2023 · 5 comments
Labels
aws-cdk-lib Related to the aws-cdk-lib package bug This issue is a bug. effort/medium Medium work item – several days of effort p2 package/tools Related to AWS CDK Tools or CLI

Comments

@tmokmss
Copy link
Contributor

tmokmss commented Apr 23, 2023

Describe the bug

As a CDK contributor, when using yarn watch in the aws-cdk-lib directory, it takes about 3 minutes to build ts files incrementally, resulting in bad developer experience.

Please let us know if there are better ways other than yarn watch for faster development iteration (write->build->test) 😃

Expected Behavior

Incremental build should finish in a few seconds, which was achieved in the previous package structure.

Current Behavior

Incremental build takes a few minutes.

Reproduction Steps

cd packages/aws-cdk-lib
yarn watch
# change some file and trigger an incremental build

Possible Solution

I'm not sure why it is so slow yet. Just creating this issue for visibility.

Maybe the package is just very large and we need to split it into multiple ones (like the previous structure). c.f. tsc doc.

Or maybe we can use faster compiler (without type check) like esbuild as an alternative for local development.

Additional Information/Context

yarn watch on framework-integ also takes 10 to 20 seconds on every incremental build. It is acceptable for now but will possibly raise a similar problem in the future.

CDK CLI Version

2.76.0

Framework Version

No response

Node.js Version

v18.13.0

OS

macOS

Language

Typescript

Language Version

No response

Other information

No response

@tmokmss tmokmss added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Apr 23, 2023
@github-actions github-actions bot added the aws-cdk-lib Related to the aws-cdk-lib package label Apr 23, 2023
@pahud
Copy link
Contributor

pahud commented Apr 24, 2023

Yes I agree we need to improve this. Thank you for the report.

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Apr 24, 2023
@pahud
Copy link
Contributor

pahud commented Apr 24, 2023

related to #25196

@MrArnoldPalmer
Copy link
Contributor

Hey, working on some optimizations now. For now I would recommend using npx tsc --watch for MOST workflows as it's significantly faster (on my machine less than 10 seconds between compiles). There are some tests that rely on transforms that JSII provides but they are pretty niche so most people won't need them.

@otaviomacedo otaviomacedo added the package/tools Related to AWS CDK Tools or CLI label Apr 27, 2023
@ashishdhingra
Copy link
Contributor

@tmokmss Closing this issue since the related issue #25196 is now closed. Feel free to reopen in case this issue still needs traction.

Copy link

github-actions bot commented Jun 6, 2024

⚠️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-lib Related to the aws-cdk-lib package bug This issue is a bug. effort/medium Medium work item – several days of effort p2 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

5 participants