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: the package seems no longer lazy-loaded #27307

Closed
tmokmss opened this issue Sep 27, 2023 · 2 comments
Closed

aws-cdk-lib: the package seems no longer lazy-loaded #27307

tmokmss opened this issue Sep 27, 2023 · 2 comments
Labels
aws-cdk-lib Related to the aws-cdk-lib package bug This issue is a bug. effort/small Small work item – less than a day of effort p2

Comments

@tmokmss
Copy link
Contributor

tmokmss commented Sep 27, 2023

Describe the bug

Hi, I just saw the release note and tested the time to require aws-cdk-lib module, expecting it's got faster from 2.98.0. However, as far as I tested it actually got slower.

2.97.0: 214ms
2.98.0: 1044ms

Looking at strace, it seems that the modules in aws-cdk-lib are not lazy-loaded any more in 2.98.0.

Expected Behavior

I don't know it's expected or not, just creating this issue for visibility.

Current Behavior

Requiring aws-cdk-lib package takes longer time than previous versions. I think it's still fast enough for running a single cdk app though.

Reproduction Steps

Install aws-cdk-lib:

npm init -y
npm i [email protected]

Then run the following code:

// index.js
console.time('require');
require('aws-cdk-lib');
console.timeEnd('require');
node index.js

Change package version and rerun:

npm i [email protected]
node index.js

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.98.0

Framework Version

2.98.0

Node.js Version

v18.13.0

OS

macOS, AL2023

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 Sep 27, 2023
@github-actions github-actions bot added the aws-cdk-lib Related to the aws-cdk-lib package label Sep 27, 2023
@khushail
Copy link
Contributor

Hi @tmokmss , Thanks for reporting this.
looks like team is working on this issue in the PR -#27314

@khushail khushail added p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Sep 27, 2023
@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-lib Related to the aws-cdk-lib package bug This issue is a bug. effort/small Small work item – less than a day of effort p2
Projects
None yet
Development

No branches or pull requests

3 participants