openclaw - 💡(How to fix) Fix [Bug]: CLI 表格渲染性能严重退化 [3 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#74469Fetched 2026-04-30 06:23:42
View on GitHub
Comments
3
Participants
2
Timeline
5
Reactions
2
Author
Timeline (top)
commented ×3closed ×1labeled ×1

openclaw status默认表格输出模式极度缓慢,耗时约 43 秒才能完成渲染。而使用--json` 模式输出同样的数据仅需约 3 秒。这表明性能瓶颈在 CLI 端的表格格式化/渲染逻辑,而非 Gateway 本身。

Root Cause

openclaw status默认表格输出模式极度缓慢,耗时约 43 秒才能完成渲染。而使用--json` 模式输出同样的数据仅需约 3 秒。这表明性能瓶颈在 CLI 端的表格格式化/渲染逻辑,而非 Gateway 本身。

RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

openclaw status默认表格输出模式极度缓慢,耗时约 43 秒才能完成渲染。而使用--json` 模式输出同样的数据仅需约 3 秒。这表明性能瓶颈在 CLI 端的表格格式化/渲染逻辑,而非 Gateway 本身。

Steps to reproduce

  1. 确保 Gateway 正在运行:systemctl --user status openclaw-gateway
  2. 执行 time openclaw status(默认表格模式)
  3. 执行 time openclaw status --json(JSON 模式)
  4. 对比两者的耗时

Expected behavior

表格模式的耗时应该与 JSON 模式相近(对于仅有 1-2 个 Agent、无 Channel 的轻量配置,应 < 5 秒)。

Actual behavior

命令耗时说明
openclaw status~43.5 秒默认表格输出
openclaw status --deep~42.9 秒深度探测 + 表格
openclaw status --json~3.0 秒同等数据,原始 JSON
openclaw status --deep --json~3.0 秒深度探测 + JSON
openclaw update status~2.7 秒其他命令不受影响
openclaw security audit~6.7 秒其他命令不受影响

OpenClaw version

2026.4.26 (be8c246)

Operating system

Ubuntu 24.04.4 LTS (Noble Numbat)

Install method

pnpm

Model

Kimi

Provider / routing chain

客户端(control-ui)→ nginx 反向代理→ OpenClaw Gateway(127.0.0.1:18789,local 模式)→ volcengine-plan API(通过 models.json 配置)→ kimi-k2.6(主模型)

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

补充观察

  • 该问题在 Gateway 重启后 100% 可复现
  • NO_COLOR=1 且非 TTY 输出,性能无改善(仍为 ~43 秒)
  • Gateway 健康端点响应 < 10ms,日志中无报错
  • CLI 成功从 Gateway 获取数据,但将绝大部分时间消耗在本地处理上

临时解决方案

如需快速查看状态,请使用 openclaw status --json

建议排查方向

瓶颈很可能位于 CLI 的表格列宽计算、文本自动换行或框线字符渲染逻辑中。特别是 Security audit 部分包含多行换行文本,可能是触发性能退化的诱因。


extent analysis

TL;DR

The performance bottleneck is likely in the CLI's table formatting and rendering logic, and using the --json mode can serve as a temporary workaround.

Guidance

  • Investigate the table column width calculation, text wrapping, and border character rendering logic in the CLI code to identify the root cause of the performance issue.
  • Verify that the bottleneck is indeed in the CLI's rendering logic by comparing the time it takes to render the table with and without the --json flag.
  • Consider optimizing the rendering logic for tables with multiple lines of text, such as the Security audit section, which may be triggering the performance degradation.
  • Test the performance with different table sizes and contents to see if the issue is specific to certain scenarios.

Example

No code snippet is provided as the issue does not contain enough information to create a specific example.

Notes

The issue seems to be specific to the CLI's rendering logic and does not affect the Gateway or other commands. The --json mode provides a significant performance improvement, suggesting that the bottleneck is indeed in the table formatting and rendering logic.

Recommendation

Apply the workaround by using the --json mode until the root cause is identified and fixed, as it provides a significant performance improvement.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

表格模式的耗时应该与 JSON 模式相近(对于仅有 1-2 个 Agent、无 Channel 的轻量配置,应 < 5 秒)。

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING