Resolve performance issues such as high CPU/memory, lag, and context pressure
This page helps you resolve issues where Qoder CLI CN feels sluggish, uses too many resources, or is under context pressure.
In long conversations, approaching the context window limit triggers automatic compaction, which can slow down responses:
Interface rendering tuning options (most are marked "restart required"):
Context pressure / frequent compaction
In long conversations, approaching the context window limit triggers automatic compaction, which can slow down responses:
- Use
/compactto proactively compress the context and free up space. - Use
/contextto view current context usage. - Split complex or long tasks into several shorter sessions; start a new session with
/new. - Limit the number of turns a session retains via
model.maxSessionTurns(-1means unlimited). - For large tasks, make good use of subagent isolation to keep the main context from ballooning.
High memory usage
advanced.autoConfigureMemory(on by default) automatically configures the Node.js memory limit.- Use
ui.showMemoryUsageto display memory usage in the interface for observation. - In very large repositories, memory discovery is bounded by
context.discoveryMaxDirs(default 200); narrow the working directory scope if needed.
High CPU / rendering lag
Interface rendering tuning options (most are marked "restart required"):
ui.terminalBuffer,ui.renderProcess: terminal buffering and rendering-process architecture.ui.useAlternateBuffer+ui.incrementalRendering: incremental rendering reduces flicker (supported only when the alternate buffer is enabled).- On low-performance terminals, turn off dynamic elements such as
ui.showSpinnerandui.loadingPhrases.
Slow tool execution
- Search: make sure
tools.useRipgrepis enabled (on by default) for faster content search. - Shell timeout:
tools.shell.inactivityTimeout(default 300 seconds) controls the no-output timeout; increase it for long commands. - MCP first-turn overhead: when connecting many MCP servers, enable lazy loading (
mcp.lazyLoadorQODER_MCP_LAZY=1) to reduce first-turn token and loading overhead.
Slow startup
- Trim unnecessary MCP servers and plugins, or use lazy loading.
- Narrow the memory discovery scope; avoid starting in an oversized directory tree.
Next steps
- Context mechanics: How Memory Works.
- Full settings table: Settings, Environment Variables, and File Paths.
- Error messages and FAQ: Error Messages and FAQ.