Resolve performance issues such as high CPU/memory usage, lag, and context pressure.
This page helps troubleshoot issues such as Qoder CLI lagging, high resource usage, or high context pressure.
When a conversation gets too long and the context approaches the context window limit, automatic compaction is triggered, which may slow down responses:
Tuning options related to interface rendering (most are marked as "requires restart"):
High Context Pressure / Frequent Compaction
When a conversation gets too long and the context approaches the context window limit, automatic compaction is triggered, which may slow down responses:
- Use
/compactto proactively compact the context and free up space. - Use
/contextto check the current context usage. - Break down complex or long tasks into multiple shorter sessions, and use
/newto start a new session. - Use
model.maxSessionTurnsto limit the number of turns retained in a session (set-1for unlimited). - Leverage subagents to isolate large tasks and prevent the main context from bloating.
High Memory Usage
advanced.autoConfigureMemory(enabled by default) automatically configures the Node.js memory limit.- Use
ui.showMemoryUsageto display memory usage in the interface for monitoring. - In extremely large repositories, memory discovery is constrained by
context.discoveryMaxDirs(default 200); narrow the working directory scope if necessary.
High CPU Usage / Rendering Lag
Tuning options related to interface rendering (most are marked as "requires restart"):
ui.terminalBuffer,ui.renderProcess: Terminal buffer and render process architecture.ui.useAlternateBuffer+ui.incrementalRendering: Incremental rendering reduces flickering (only supported when the alternate buffer is enabled).- On low-performance terminals, you can disable dynamic elements such as
ui.showSpinnerandui.loadingPhrases.
Slow Tool Execution
- Search: Ensure
tools.useRipgrepis enabled (default) for faster content search. - Shell Timeout:
tools.shell.inactivityTimeout(default 300 seconds) controls the timeout for no output; increase it appropriately for long-running commands. - MCP First-Turn Overhead: When connecting to multiple MCP servers, enable Lazy Loading (
mcp.lazyLoadorQODER_MCP_LAZY=1) to reduce first-turn token and loading overhead.
Slow Startup
- Reduce unnecessary MCP servers and plugins, or use Lazy Loading.
- Narrow the memory discovery scope to avoid starting in extremely large directory trees.
Next Steps
- Context mechanism: How Memory Works.
- Full configuration reference: Configurations, environment variables, and file paths.
- Error messages and FAQ: Error messages and FAQ.