openclaw - 💡(How to fix) Fix Per-request startup pipeline takes 90-130s (core-plugin-tools + system-prompt + stream-setup) [2 comments, 3 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#76061Fetched 2026-05-03 04:42:46
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
2
Author
Timeline (top)
commented ×2closed ×1cross-referenced ×1unsubscribed ×1
RAW_BUFFERClick to expand / collapse

Environment

  • OpenClaw: v2026.4.29
  • Node.js: v24.14.0
  • Host: Ubuntu 22.04, 16GB RAM, 8 vCPU (no GPU)
  • Plugins: feishu, memory-core
  • Workspace: 6 skills, ~12KB md files
  • Primary model: volcengine-plan/glm-5.1 (remote)

Problem

Every user message requires 90-130 seconds before the first token streams. trace:embedded-run consistently shows three bottlenecks with no caching across requests:

  • core-plugin-tools: 20-38s (enumerating all plugin tool definitions)
  • system-prompt: 15-40s (building system prompt from workspace files + skills + tools)
  • stream-setup: 15-39s (establishing model connection)

This is a per-request cost - the pipeline runs from scratch every time, even for consecutive messages in the same session.

Impact

Event loop blocked for 30-60s during processing: liveness warning: eventLoopDelayMaxMs=63015 eventLoopUtilization=1 cpuCoreRatio=1.025

This causes:

  • WebSocket handshake timeouts
  • Control UI unresponsive during processing
  • Feishu streaming card creation fails (HTTP 400 fallback)
  • 1-3 minute delays before any response visible

Expected

  1. Tool definitions and system prompt should be cacheable across requests (invalidate on config change only)
  2. Stream setup to remote model should not take 15-39s (connection pooling/keep-alive)
  3. Event loop should not be blocked during I/O-bound stages

Reproduction

Consistently reproducible on any message. totalMs ranges from 55s to 160s across 10+ samples.

extent analysis

TL;DR

Implement caching for plugin tool definitions and system prompts, and consider connection pooling for the remote model to reduce the per-request cost.

Guidance

  • Investigate the core-plugin-tools and system-prompt components to determine why caching is not being applied across requests, and implement a caching mechanism to store the results of expensive operations.
  • Review the stream-setup component to explore options for connection pooling or keep-alive mechanisms to reduce the time spent establishing a connection to the remote model.
  • Analyze the event loop utilization to identify opportunities for optimizing I/O-bound stages and preventing blockage.
  • Consider implementing a queue or worker thread to offload expensive operations and prevent event loop blockage.

Example

No code snippet is provided as the issue does not contain sufficient information about the implementation details.

Notes

The provided information suggests that the issue is related to the performance of specific components, but the root cause may be complex and require further investigation. The suggested guidance points are intended to help identify and address potential bottlenecks.

Recommendation

Apply workaround: Implement caching and connection pooling mechanisms to reduce the per-request cost and prevent event loop blockage, as the issue is likely caused by the lack of caching and inefficient connection establishment.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Per-request startup pipeline takes 90-130s (core-plugin-tools + system-prompt + stream-setup) [2 comments, 3 participants]