Skip to content

Conversation

Hoblovski
Copy link
Collaborator

@Hoblovski Hoblovski commented Sep 8, 2025

What type of PR is this?

优化合集


效果 相关讨论

  1. 缓存:(除去 sleep 的 5 秒)
  • 第一次运行 -85% (205+sec -> 28sec) (vs uncached)
  • 第二次运行相对第一次 -94% (28sec -> 1.7sec) (因为无需 LSP)
  1. 优化函数:-14%

  1. 把 Collect 分解成小函数

为了打印进度(因为 py 太慢了)以及下一点 2.

  1. -include。

和 -exclude 一起用的时候,语义是 "被包括 且 不被排除"

  1. 优化:加 LSP 透明缓存。支持断点续传(周期性 dump 到文件)

-lsp-cache-path CACHE_PATH
在 jsonrpc.Call 层做的

  1. 可选的 profiling

-profile PPROF_FILE_PATH

  1. 优化函数:getSymbolByLocation(), filterLocalSymbols()

按 sym.URI 分槽查询

还有一些不确定要不要 push

  1. 去掉报错信息(尤其是找不到类型 -> py 没类型)
  2. configure LSP 放到 Language Spec 里

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:
zh(optional):

(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:


import "github.com/cloudwego/abcoder/lang/lsp"

func isFuncLike(sk lsp.SymbolKind) bool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who is the caller of these three functions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skipTokenForDependency and getSymbolByLocation in Collect.go. I thought this might help with clarifying & maintaining consistency tho.

@Hoblovski
Copy link
Collaborator Author

The optimizations are real, but let's not merge this for now.

The first commit was a major overhaul of Collect. I guess it could wait until the tree-sitter extension is merged, so we do not have two overhauls going on at the same time.

@GuangmingLuo
Copy link
Member

Please add [WIP] in the PR title or change to draft PR when not planning to merge it

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

Successfully merging this pull request may close these issues.

3 participants