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

KCL drastically slows down when #328

Closed
dennybaa opened this issue May 21, 2024 · 2 comments · Fixed by #314
Closed

KCL drastically slows down when #328

dennybaa opened this issue May 21, 2024 · 2 comments · Fixed by #314
Assignees

Comments

@dennybaa
Copy link

Hello @Peefy, seems I've run into an odd operational bug...

When kcl is invoked from a sub-directory sourcing the k file which hops over the module kcl.mod directory... It slows down drastically.
Here's my scenario:

  1. kcl.mod is at git root.
  2. cd a/b/c jump into 3rd level

When on on the 3rd level:

time kcl -dY kcl.yaml ../../../bootstrap.k
hello:
  world: 1234
kcl -dY kcl.yaml ../../../bootstrap.k  0.09s user 0.03s system 1% cpu 9.267 total

Moving the same file but not reaching the root we get expected result:

hello:
  world: 1234
kcl -dY kcl.yaml ../../bootstrap.k  0.05s user 0.01s system 98% cpu 0.064 total

kcl starts doing networking, including querying DNS. This is clearly seen from strace. All this is not seen when we don't hop over the directory with the kcl.mod file...

Thank you!

@dennybaa
Copy link
Author

dennybaa commented May 21, 2024

probably should have opened the issue in https://github.com/kcl-lang/kcl ...

@Peefy
Copy link
Contributor

Peefy commented May 22, 2024

Hello. Thanks for the feedback.

This is a known problem about this issue: #324. This is due to the calculation of file hashing causing the runtime to slow down in the presence of kcl. mod and external dependencies. @zong-zhe is working on this to fix it #314

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.

3 participants