-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Open
Labels
perfIndicates a performance issue or need for optimizationIndicates a performance issue or need for optimization
Description
Description
Multiple users are experiencing LSP-related freezes and timeouts across different scenarios:
- Kotlin LSP exceeding 45s timeout ([FEATURE]: Allow configurable timeouts to be set on LSPs #7477)
- ESLint diagnostics timing out at 3s, returning empty results (ESLint LSP server initializes but diagnostics timeout with empty result #13272)
- Windows app freezes related to blocking LSP operations (1.1.57.0 OpenCode Desktop bug after update: Freezes, terminal loop - No longer usable #13154)
Root Cause Analysis:
- Blocking initialization:
getClients()blocks the UI thread when LSP servers are slow to start - Insufficient timeout defaults: Diagnostics timeout was hardcoded at 3s — too short for heavy linters like ESLint and Kotlin LSP
- No user escape hatch: No way for users to configure timeouts for their specific environment
Related PRs:
| PR | Approach | Status |
|---|---|---|
| #13332 | Non-blocking init + configurable diagnostics timeout | Open |
| #13281 | Diagnostics timeout 3s→10s | Open |
| #6997 | Configurable per-server timeout via config | Open |
| #13287 | Startup package-manager timeout guard | Open (independent) |
| #13299 | UI freeze on large diffs | Open (independent) |
Resolution Path:
Addressed by PR #13332:
- ✅ Non-blocking LSP initialization (
getClientsreturns immediately) - ✅ Configurable diagnostics timeout (10s default, override via
OPENCODE_EXPERIMENTAL_LSP_DIAGNOSTICS_TIMEOUT_MS)
Remaining work (separate concerns):
- Per-server timeout config (feat: Add configurable lsp timeout #6997) — more granular control
- Startup timeout (fix(installation): guard startup package-manager probes with timeout #13287) — different timeout location
- UI rendering performance (perf(app): collapse large diffs in review panel to prevent UI freeze #13299) — not LSP-related
Plugins
No response
OpenCode version
dev (latest)
Steps to reproduce
- Open a project with a heavy LSP (e.g., Kotlin, ESLint with many plugins)
- Start OpenCode
- Observe: UI blocks during LSP initialization, and diagnostics timeout at 3s returning empty results for slow language servers
Screenshot and/or share link
No response
Operating System
Cross-platform (reported on macOS, Windows, Linux)
Terminal
Multiple terminals affected (not terminal-specific)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
perfIndicates a performance issue or need for optimizationIndicates a performance issue or need for optimization