feat(opencode): core performance optimizations#8922
feat(opencode): core performance optimizations#8922AungMyoKyaw wants to merge 1 commit intoanomalyco:devfrom
Conversation
…ration - Implemented write buffering in Session.updatePart to reduce disk I/O frequency during streaming. - Switched storage to compact JSON to reduce payload size and serialization overhead. - Added a 5-second cache for Ripgrep.tree results to accelerate file exploration.
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found one potentially related PR: PR #1163: TUI Performance Optimization This PR focuses on TUI (Terminal User Interface) performance optimization. While it's a different layer than the core optimizations in PR #8922 (which focuses on I/O buffering, storage, and ripgrep caching), it may be worth reviewing to ensure there's no overlap in optimization efforts or conflicts in implementation. However, the PRs appear to target different components (core vs. TUI), so they are likely complementary rather than duplicates. |
Summary
This PR implements several high-impact optimizations to the OpenCode core to improve efficiency during AI interaction and file exploration.
Changes
Session.updatePartnow buffers streaming deltas in memory, reducing disk writes from O(N) to O(1) per message part.Ripgrep.treeto significantly speed up file exploration in large repositories.Verification
lsp_diagnostics.