Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Windows 常驻运行时,反复打开统计面板会留下图表的全局事件订阅;可见窗口的逐次同步刷新也会增加 UI 分配和输入线程等待。另外,小型透明悬浮窗在本机的默认 WPF 渲染路径上占用了较多 D3D 资源。
本 PR 修复图表的订阅生命周期,将统计刷新合并并限定在窗口可见时执行,并仅对常驻悬浮窗启用窗口级软件渲染。改动范围为 Windows 实现代码、回归测试及其 CI 配置。
改动
验证
性能测量及边界
完整应用实际使用反馈(2026-11-13 更新)
用户运行包含本 PR 两轮优化的本地 1.56.2 构建后,反馈 Windows 完整应用的内存占用已稳定在 20–50MB。此前同一用户报告原版约 200MB,第一轮优化构建仍曾出现 210MB 以上的读数。
20–50MB 来自用户日常使用中的观察,属于完整应用反馈,与下方隔离悬浮窗的基准测试分开记录。反馈未明确具体内存计数器或持续观察时长,因此不将其换算为私有提交内存、GPU 内存或精确降幅,也不作为所有设备上的内存上限。当前本机运行路径已核对为本地 1.56.2 构建。
隔离悬浮窗对照测试
在同一台 Windows 电脑上,用全新进程分别实例化真实 FloatingStatsWindow,注入模拟统计并持续变更数字,得到如下短时样本:
这些是隔离悬浮窗进程的测量,不能等同于完整应用或任务管理器的私有工作集,内存与 GPU 指标也不能相加。结果受显卡、驱动、DPI 和使用场景影响。短时 CPU 样本未出现明显增加。完整应用已有上述用户实际使用反馈,跨设备表现、精确内存口径及更长时间运行下的 CPU/内存取舍仍需进一步验证。
复现命令(先准备 Release 构建):