Skip to content

clip/main: ClipHost 后台空闲 CPU 偏高(约 8–10%) #84

Description

@ceastld

Summary

多用户反馈:剪贴板 n10 / ClipHost 在后台空闲时 CPU 约 8–10%(任务管理器截图约 9.9%)。正常预期接近 0%。作者侧已确认「一般是 0,看起来确实有问题」。

Source

Repro / Symptom

  1. 启动剪贴板 n10 / ClipHost 后不操作(窗口收起/后台)
  2. 任务管理器观察 IntelliTools.ClipHost CPU 持续约 8–10%

Investigation notes(待验证)

高优先级嫌疑:高频 DispatcherTimer 在窗口仍可见(含贴边折叠 / EdgeHide)时持续跑:

  1. WindowEdgeHider:10ms 定时器(100 Hz)— BetterClip/Service/Windows/Hide/EdgeHider.cs,默认 IsEnabled = true,每 tick CheckWindowPosition()
  2. HostDismissController:50ms 轮询(20 Hz)— ClipboardHostWindowWebView.HostChrome.cs / HostDismissController.PollIntervalMs = 50,窗口 IsVisible 时轮询指针做 Fold/Hide
  3. 次要:WebView2 在 Fold 半显、剪贴板监听、低级钩子等

建议:测量「完全关闭主窗 / 仅托盘」vs「贴边折叠仍 Visible」vs「关闭 EdgeHide」的 idle CPU;优先降低 EdgeHider 轮询频率或改为事件驱动(指针进/出、移动结束)。

Expected

后台空闲 CPU 接近 0%(作者预期)。

Environment

  • OS: Windows(主帖截图)
  • Product: clip/main · IntelliTools.ClipHost
  • 话题动作修订:v105 一带

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:clipClipboard appsbugSomething isn't workingtype:bugBug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions