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

对于单文件超10000行代码执行Clear blame,vscode浏览当前文件会卡死,大概30s恢复正常 #507

Open
Britripe opened this issue Feb 18, 2025 · 2 comments

Comments

@Britripe
Copy link

【问题描述】
对于单文件超10000行代码执行Clear blame,vscode浏览当前文件会卡死,大概30s恢复正常。

@Britripe
Copy link
Author

【问题描述】 对于单文件超10000行代码执行Clear blame,vscode浏览当前文件会卡死,大概30s恢复正常。

可能是 打开了 Enable Visual Indicators,导致计算量大,关闭就好很多了

@metacurb
Copy link
Member

Thanks for reporting this issue!

A decoration is applied to every line in the file. The decoration is what adds the coloured visual indicator to the beginning of the line. With 100,000 lines, this is going to become an issue!

I spent a little bit of time thinking about different options:

  • Grouping decorations by revision and applying them all at once. This is fine until you click a line and the log message is appended to every line for the same revision
  • Replacing the PNGs with base64 encoded SVGs. This didn't work because VS Code expects a physical file path
  • Removing the PNGs and replacing with SVGs generated during the build step. I haven't tried this yet, but I will look into it soon. It's also a good first task if someone would like to have a go themselves.
  • Looking into a way to prevent the decoration application from blocking the editor. I'm not sure if this is possible but I will take a further look sometime this week.

I'm not 100% sure what the best way to approach this issue is. If you have any thoughts please let me know!

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

No branches or pull requests

2 participants