Closed logo749 closed 2 months ago
@logo749 Good Catch! 👍 PRs are also welcome. ❤️
cc @He1pa Can you help answer or troubleshoot the problem?
Thanks for your feedback, I solved the issue of visiting the node twice in #1498. And we track the overall performance issues of LSP in #1237
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your KCL components version? (Required)
0.9.0
I found the problem is in the walk_config_entries of the resolver process:
kcl-main/kclvm/sema/src/resolver/config.rs line: 521
walk_config_entries will travel all children twice, cause a child node be visited 2 * (parent count) count. In a deep tree, will become a big performance issue. In my case is a 2w+ line .k, 20+ depth
My question is: