[PR #8922] feat(opencode): core performance optimizations #12913

Closed
opened 2026-02-16 18:17:47 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/8922

State: closed
Merged: No


Summary

This PR implements several high-impact optimizations to the OpenCode core to improve efficiency during AI interaction and file exploration.

Changes

  • I/O Buffering: Session.updatePart now buffers streaming deltas in memory, reducing disk writes from O(N) to O(1) per message part.
  • Compact Storage: Switched to compact JSON for internal state persistence, reducing I/O payload size.
  • Ripgrep Caching: Added a 5-second results cache for Ripgrep.tree to significantly speed up file exploration in large repositories.

Verification

  • Verified with lsp_diagnostics.
  • Ensured stability of core loops during streaming.
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/8922 **State:** closed **Merged:** No --- ## Summary This PR implements several high-impact optimizations to the OpenCode core to improve efficiency during AI interaction and file exploration. ### Changes - **I/O Buffering**: `Session.updatePart` now buffers streaming deltas in memory, reducing disk writes from O(N) to O(1) per message part. - **Compact Storage**: Switched to compact JSON for internal state persistence, reducing I/O payload size. - **Ripgrep Caching**: Added a 5-second results cache for `Ripgrep.tree` to significantly speed up file exploration in large repositories. ### Verification - Verified with `lsp_diagnostics`. - Ensured stability of core loops during streaming.
yindo added the pull-request label 2026-02-16 18:17:47 -05:00
yindo closed this issue 2026-02-16 18:17:47 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12913