mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-11-04 04:52:39 +08:00
[perf] optimize CLI ANSI output and refresh previews
This commit is contained in:
@@ -44,14 +44,14 @@ On **2026-10-25**, 16 images were rendered from the actual Slint components at `
|
||||
|
||||
## CLI 图示 / CLI captures
|
||||
|
||||
- **2026-10-31 04:56(UTC+8)重新采集**,使用在 macOS arm64 上从 `22796368` 构建的 release CLI,连接同一用户授权的被控设备,分别采集 ANSI 与 Kitty 输出。两次连接均保持只读;图示展示远端播放动画时的不同画面。
|
||||
- 使用工程外的 POSIX 伪终端采集器,视口为 **128 列 × 40 行**,每格 **10 × 20 像素**,输出 PNG 为 **1280 × 800**。顶栏与底部快捷键直接来自 CLI 输出;图示不包含连接密码或真实设备 ID。
|
||||
- ANSI 图由实际转义序列恢复字符网格及前景/背景色,四象限字符按对应的色块渲染。Kitty 图使用本地共享内存传输:采集器通过 `mmap` 复制完整 RGB 帧后返回确认,按协议 placement 的行列尺寸显示。采集时只读取状态栏所需的字符,保存图片时才做最终缩放和 PNG 渲染,减少采集器对输出的阻塞。
|
||||
- 截图中的 Kitty `FPS 27`、ANSI `FPS 7` 是当时统计区间的实际输出值。会话日志确认 Kitty 使用 `shared_memory`,未发生回退;静止画面下 ANSI 的差分为空时不产生新的输出计数,可显示 `FPS 0`。本轮同时缩小了视口并优化采集器,不能据此单独量化窗口大小的性能收益。
|
||||
- 这些图片是**实际 CLI 输出的渲染图**。Ghostty 和 macOS「终端」窗口的自动化访问被工具拒绝,未取得原生窗口截图,也未据此完成这两款应用的实窗验收。字体栅格、图像缩放和显示时序由采集器处理,不能用图中 FPS 推断 Ghostty 或其他终端的实际显示性能。
|
||||
- 构建配置、采集脚本、原始输出与中间产物均存放在工程外临时目录;工程内只保存最终图示及文档。示例命令使用占位 ID,凭据通过隐藏提示输入。
|
||||
- **2026-10-31 05:17–05:18(UTC+8)重新采集**,使用在 macOS arm64 上从 `1b716f36` 及当前工作区 ANSI 优化重新构建的 release CLI,连接同一用户授权的被控设备。两次连接均保持只读,展示远端播放动画时的不同画面。
|
||||
- 沿用工程外的 POSIX 伪终端采集器,视口为 **128 列 × 40 行**,每格 **10 × 20 像素**,输出 PNG 为 **1280 × 800**。顶栏与底部快捷键直接来自 CLI 输出;图示不包含连接密码或真实设备 ID。
|
||||
- ANSI 图由实际转义序列恢复字符网格及前景/背景色,四象限字符按对应色块渲染;采集器等待完整 ANSI 帧结束后保存,支持本轮新增的行内多片段差分。Kitty 图使用本地共享内存传输:采集器通过 `mmap` 复制完整 RGB 帧后返回确认,按协议 placement 的行列尺寸显示。采集时只读取状态栏所需的字符,保存图片时才做最终缩放和 PNG 渲染。
|
||||
- 图中的 ANSI `FPS 26`、Kitty `FPS 24` 是对应统计区间的实际完整输出次数。会话日志确认本地输出预算均为 8MiB/s,Kitty 使用 `shared_memory`,未发生回退;两次连接正常退出。源分辨率与画面内容不同,不能用这两张图直接比较后端性能或量化本次优化收益。静止画面下 ANSI 差分为空时不产生新的输出计数,可显示 `FPS 0`。
|
||||
- 这些图片是**实际 CLI 输出的渲染图**,本轮沿用 PTY 采集,没有取得 Ghostty 或 macOS「终端」的原生窗口截图。字体栅格、图像缩放和显示时序由采集器处理,不能用图中 FPS 推断终端的实际显示性能。
|
||||
- 采集脚本、原始输出、构建日志、源码/二进制哈希和中间产物均存放在工程外临时目录;工程内只更新最终图示及来源说明。示例命令使用占位 ID,凭据通过隐藏提示输入;构建后已恢复原来的 debug 配置。
|
||||
|
||||
Refreshed at **04:56 (UTC+8) on 2026-10-31** with a macOS arm64 release CLI built from `22796368`, using real read-only connections to the same authorized host during animation playback. An external POSIX PTY collector reports 128 × 40 cells at 10 × 20 pixels and renders the actual CLI output to PNG. The ANSI image reconstructs character cells and colors. The Kitty collector copies each complete shared-memory RGB frame through `mmap` before acknowledging it, then applies placement dimensions when saving the image. Status polling reads only the top row, and final image scaling and PNG rendering happen only when saving. The captured Kitty `FPS 27` and ANSI `FPS 7` are interval output counts; an unchanged ANSI view can show `FPS 0`. Both viewport size and collector processing changed, so this is not an isolated window-size benchmark. These output renderings do not validate native Ghostty or macOS Terminal rendering or GPU performance. Passwords and real device IDs are omitted. Capture scripts, raw output, build configuration, and intermediate files stay outside the repository.
|
||||
Refreshed at **05:17–05:18 (UTC+8) on 2026-10-31** with a freshly rebuilt macOS arm64 release CLI from `1b716f36` plus the working-tree ANSI optimizations, using real read-only connections to the same authorized host during animation playback. The external POSIX PTY collector retains 128 × 40 cells at 10 × 20 pixels and renders the actual CLI output to 1280 × 800 PNGs. The ANSI collector reconstructs character cells and colors, supports multiple changed spans per row, and waits for a complete frame before saving. The Kitty collector copies each complete shared-memory RGB frame through `mmap` before acknowledging it and applies placement dimensions when saving. The captured ANSI `FPS 26` and Kitty `FPS 24` are interval counts of complete outputs. Both sessions used an 8MiB/s local output budget and exited normally; Kitty used shared memory with no fallback. Source resolutions and scene content differ, so these images are not a direct backend comparison or an isolated optimization benchmark. An unchanged ANSI view can show `FPS 0`. These output renderings do not validate native Ghostty or macOS Terminal rendering or GPU performance. Passwords and real device IDs are omitted. Scripts, raw output, build logs, source/binary hashes, and intermediate files stay outside the repository; the original debug configuration was restored.
|
||||
|
||||
重新采集时,使用 release CLI,在支持相应协议的终端或 PTY 采集器中分别运行 `crossdesk-cli <设备ID> --renderer ansi --quality high` 和 `crossdesk-cli <设备ID> --renderer kitty --quality high`,通过隐藏提示输入密码,等待顶栏显示 `Displaying` 且统计稳定后捕获完整视口,再按 `q` 退出。若使用 PTY 采集器,须正确处理终端尺寸回复、ANSI 光标与颜色、Kitty 探测、分块上传、共享内存读取与确认,以及 placement 缩放,并在图注中明确采集方式。更新图片前检查敏感信息、画面比例和状态栏完整性,并同步更新本节的日期、版本与验证范围。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user