Performance issues
Description
All of a sudden today Opencode has started to have major performance issues. I haven't updated OC today and so I supect perhaps OhMyOpencode updated and this is the cause? It's hard to say the culprit. But This video is of a fresh system restart and a new prompt. Activity Monitor shows opencode's process isn't consuming significant memory or CPU. Something else is up. (if you wait a moment you'll see the Knight Rider spinner come into view and animate very slowly)
https://github.com/user-attachments/assets/b92963f0-3002-4eba-813a-4e072fb0a02f
OpenCode version
1.0.223
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
MacOS
Terminal
Ghostty
This issue might be a duplicate of existing issues. Please check:
- #6488: Bash Fork Issues - Investigation Included
- #3822: Output starts to slow to a crawl
- #6172: High CPU usage (100%+) during LLM streaming in long sessions due to O(n) text buffer rendering
- #6213: Memory leak during prolonged usage
Feel free to ignore if none of these address your specific case.
it's happening to me with latest version, memory goes to the roof and UI freeze.
I've seen the same behaviour (Linux) sometime after the #6319 was merged. I'm not saying that the PR was the culprit, I'm just saying the issue started around that time. What I've noticed that when tasks are issued through the API there is a high memory consumption.
@arsham that PR hasn't been released so unless u run against dev it couldn't be the issue.
Today we have made no releases whatsoever so if you started seeing issues I think it is your plugins
@rekram1-node I am running against dev. I will try to bisect and tell you if I could identify the issue. It may well be my plugins are not behaving correctly.
I'm pretty sure this was in Oh My Opencode. Sorry for the false report here.
Sounds good
@arsham could also be this potentially: https://github.com/anomalyco/opencode/commit/ff0bd84870d4f3335f5f60621a46efaec6579332
Does opencode update its own deps under the hood or is opentui statically included?
Oh I was talking to him since he is running dev directly, you arent. You wouldnt have this change im referring to
@rekram1-node good catch. I'll revert this locally and will report back.
@rekram1-node it was unrelated to this commit, might be my own setup.