Skip to content

fix(windows): 修复编辑器输入卡顿(每键全文同步、Git blame 与 LSP 轮询) - #203

Closed
Rangsh wants to merge 7 commits into
1lck:preview/0.3.0from
Rangsh:preview/0.3.0
Closed

fix(windows): 修复编辑器输入卡顿(每键全文同步、Git blame 与 LSP 轮询)#203
Rangsh wants to merge 7 commits into
1lck:preview/0.3.0from
Rangsh:preview/0.3.0

Conversation

@Rangsh

@Rangsh Rangsh commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

摘要

  • 修复 Windows 编辑器输入时每键触发多轮全文读取、行数组重建和 Buffer 广播导致的持续不跟手
  • Inline Git Blame 改为按打开 / 保存 / Git revision 刷新并取消过期进程,普通打字不再拉起 git.exe
  • 支持增量同步的语言服务器改为 range-based didChange;空闲会话使用 lsp.waitEvents,不再 20ms 轮询
  • 2 MiB / 50,000 行以上文件默认关闭 LSP、blame、Code Lens、semantic tokens 等昂贵服务,并提供可恢复提示

Fixes #187

测试计划

  • 500 KiB CRLF .ts 连续输入跟手,停笔约 500ms 不再顿挫,打字过程不新起 git.exe
  • 约 2 MiB 文件出现大文件服务降级条,可点「仍然启用」恢复
  • 仅打开 / 保存时刷新 inline blame;纯输入不刷新
  • 支持 Incremental sync 的 LSP 收到 range 变更;空闲不再 20ms lsp.pollEvents
  • Undo / Redo、CRLF、选择范围、外部文件更新、补全与诊断无回归

@Rangsh
Rangsh requested a review from 1lck as a code owner August 20, 2026 11:02

@1lck 1lck left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

审查发现 2 个 P1 正确性/性能问题和 1 个设置页滚轮回归,具体修复建议见 inline comments。

Comment thread rust/lithe-core/src/lsp/interface/client.rs Outdated
Comment thread rust/lithe-core/src/lsp/interface/engine.rs Outdated
Comment thread windows/tauri/src/features/settings/components/settings-dialog.tsx Outdated
Rangsh and others added 4 commits August 20, 2026 22:30
同步消除诊断面板 ScrollArea 无限更新崩溃,以及查找栏 Shift+Enter 提示闪烁。

Co-authored-by: Cursor <cursoragent@cursor.com>
解决 engine.rs、monaco-editor.tsx、lsp-core-adapter.ts 冲突,保留审查修复与上游 JDTLS/会话改动。

Co-authored-by: Cursor <cursoragent@cursor.com>
WebView2 会将滚轮默认动作粘在 overflow:hidden/clip 子节点上,且 Base UI ScrollArea 仅在滚动条上处理 wheel。改为由滚动容器主动转发滚轮,并消除设置页双层滚动结构。

Refs: 1lck#205
Co-authored-by: Cursor <cursoragent@cursor.com>
@1lck

1lck commented Aug 21, 2026

Copy link
Copy Markdown
Owner

#203 已按审查范围拆到 #209:只保留 #187 的输入热路径 / blame / incremental didChange / waitEvents / 大文件降级,基于当前 preview/0.3.0(含已合入的 #201)。

设置页与文件树滚轮、默认 autoSave、JDTLS 查找没有带过去。#201 的主题选择器和 overflow-clip 保持不动。

请用 #209 继续审;这条可以关。

1lck added a commit that referenced this pull request Aug 21, 2026
…nd JDTLS lookup

Restore the remaining effective extras from #203 that are not the
settings/file-tree wheel work: workbench render recovery, the unsaved
tab-close dialog required by the tab-chrome split, default auto-save,
and bundled JDTLS discovery for unbundled Windows builds.
@1lck 1lck closed this Aug 21, 2026
1lck added a commit to Mucheen/Lithe-IDEA that referenced this pull request Aug 21, 2026
Keep Monaco as the in-session source of truth, send incremental LSP
didChange, wait on lsp.waitEvents instead of polling, refresh inline
blame on open/save/revision, and gate expensive services on large files.

This is the scoped 1lck#187 fix from 1lck#203: settings/file-tree wheel, autoSave
default, and JDTLS lookup are not included. 1lck#201's theme selector and
overflow-clip stay on preview/0.3.0.

Fixes 1lck#187
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 this pull request may close these issues.

2 participants