Skip to content

Reduce idle CPU load and the daily-use feedback noise - #12

Open
ccedaaa wants to merge 1 commit into
richlearntodo-debug:mainfrom
ccedaaa:play
Open

ccedaaa wants to merge 1 commit into
richlearntodo-debug:mainfrom
ccedaaa:play

Conversation

@ccedaaa

@ccedaaa ccedaaa commented Oct 11, 2026

Copy link
Copy Markdown

背景

我把这套遥控器当主力输入工具在用(每天大量口述),V2.0.0 用了几天后攒下一批问题,已经在 #9、#10 里报过。这个 PR 是把改好的版本回馈给上游。

改动基于 main(1b56c2f)之上,1 个提交,6 个文件。

改了什么

性能(重点)

  • 删掉 PaintWorkspaceTexture:一次滚动重绘 227 ms → 1.74 ms。
  • PollActivity 做缓存:日志尾、进程表快照、桥与采集的健康 JSON、会话标记扫描都改成按版本号缓存;文本/颜色更新走 SetLabelText / SetLabelColor;拖动窗口(WM_ENTERSIZEMOVE)期间暂停轮询。单次轮询 22 ms → 约 10.5 ms,界面线程 5.4% → 2.4% 单核。空闲时整机占用随之下降。

行为

没有动的东西(按仓库 AGENTS.md 的约束)

  • 没碰 Raw Input / 键盘钩子 / 设备过滤 / 手势识别,也没改任何冻结的手势常量。
  • 没碰冻结的 Capture 组件:VibeMicAtvvCapture.exe 校验值保持 B62DE035A9CAD0A16B97F6935C6E4DE0BF2B73C61B180595482D852C0582E683 不变。
  • 没加新依赖、没带第三方二进制、没改注册表、没装驱动。
  • 配置向后兼容:新字段默认关闭,旧配置直接可用。

验证

BUILD_DEVELOPMENT.ps1                  -> 构建通过,冻结 Capture 校验值未变
node scripts/validate.js               -> passed
scripts\tests\Test-V2FeatureSuite.ps1  -> passed
VibeMic.exe --self-test                -> passed

真机信息:Windows 11(build 26200)+ 小米 RC003,ATVV,用遥控器麦克风,hold-to-talk;音频出口是 VB-CABLE(CABLE Input)。

说明

  • 设置页新增了一个复选框,docs/images 下的六个截图我没有重新生成(没跑 capture-ui-screenshots.ps1)。需要的话我可以补一版。
  • 我只以"能不能天天用"为标准验证,未在真机上确认的项没有写成已验证。

English summary

Fixes a batch of issues that a daily-use session surfaced in V2.0.0 (originally reported in #9 and #10): idle CPU load, a Live HUD that popped up unasked, onboarding step 4 that could not be completed after a restart, a voice-wake false positive, and repeated focus log lines.

Behaviour is unchanged when the new option is off. No changes to Raw Input, the keyboard hook, device filtering, gesture constants, or the frozen Capture component; the new configuration field defaults to off, so existing configurations keep working.

A full day of remote-driven dictation surfaced a set of issues in the
shipping V2.0.0 build; this is the set of fixes for them.

Performance:
- Remove PaintWorkspaceTexture; a scroll repaint went from 227 ms to
  1.74 ms.
- Cache the log tail, the process snapshot, the bridge and capture health
  JSON, and the session marker scan in PollActivity; route label changes
  through SetLabelText/SetLabelColor and pause the poll during
  WM_ENTERSIZEMOVE. A poll went from 22 ms to about 10.5 ms, and the UI
  thread from 5.4% to 2.4% of one core.

Behaviour:
- Stop the Live HUD from presenting itself: liveHudAutoShow defaults to
  false and the settings page exposes it as its own checkbox. The tray
  item still shows it on demand.
- Keep the bridge state and health files under the configured UserData
  root and record last_raw_press for diagnostics.
- Judge onboarding step 4 freshness by the completion receipt timestamp so
  the step can be finished (issue richlearntodo-debug#9).
- Sync the confirmed shortcut revision to the bridge after the gesture
  layer saves.
- Stop the voice wake false positive that armed on a stale observation
  (issue richlearntodo-debug#10).
- Write the focus lock line only when the state actually changes instead of
  once per poll.

Verified: BUILD_DEVELOPMENT.ps1, node scripts/validate.js, the V2 focused
feature suite, and the host self-test all pass; the frozen capture stays at
B62DE035A9CAD0A16B97F6935C6E4DE0BF2B73C61B180595482D852C0582E683.
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.

1 participant