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

Why is cdk-import so slow? #10

Closed
eladb opened this issue Aug 26, 2021 · 4 comments · Fixed by #15
Closed

Why is cdk-import so slow? #10

eladb opened this issue Aug 26, 2021 · 4 comments · Fixed by #15

Comments

@eladb
Copy link
Contributor

eladb commented Aug 26, 2021

From Tel-Aviv:

$ time npx cdk-import AWSQS::EKS::Cluster
0.88s user 0.19s system 7% cpu 14.626 total

14 seconds?

@eladb
Copy link
Contributor Author

eladb commented Aug 27, 2021

@hoegertn is this because of the resolution between name and ARN?

@hoegertn
Copy link
Contributor

Might be. I will try to do timing tests to see where the time is lost

@hoegertn
Copy link
Contributor

The listing of the types uses all the time. It seems the filtering is done client-side or at least not efficient. There are around 10 paginated list calls and one has the result in it. So this takes 5 seconds on my env with a total runtime of 5-6 seconds.

We could short-circuit this by also allowing to specify the ARN of the type. For mass generation, where the time is important, you could do one list call outside of the tool and then call it with all the arns.

I was able to generate within 800ms when providing the ARN.

@eladb
Copy link
Contributor Author

eladb commented Aug 30, 2021

We could short-circuit this by also allowing to specify the ARN of the type. For mass generation, where the time is important, you could do one list call outside of the tool and then call it with all the arns.

Yes, I think that if an ARN is provided, the lookup should be skipped. This will definitely address the mass generation use case. That's the minimum I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants