opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Performance issues

Open bcardarella opened this issue 3 months ago • 2 comments

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

bcardarella avatar Jan 02 '26 20:01 bcardarella

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.

github-actions[bot] avatar Jan 02 '26 20:01 github-actions[bot]

it's happening to me with latest version, memory goes to the roof and UI freeze.

mromanuk avatar Jan 03 '26 01:01 mromanuk

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 avatar Jan 03 '26 02:01 arsham

@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 avatar Jan 03 '26 03:01 rekram1-node

@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.

arsham avatar Jan 03 '26 03:01 arsham

I'm pretty sure this was in Oh My Opencode. Sorry for the false report here.

bcardarella avatar Jan 03 '26 03:01 bcardarella

Sounds good

rekram1-node avatar Jan 03 '26 03:01 rekram1-node

@arsham could also be this potentially: https://github.com/anomalyco/opencode/commit/ff0bd84870d4f3335f5f60621a46efaec6579332

rekram1-node avatar Jan 03 '26 03:01 rekram1-node

Does opencode update its own deps under the hood or is opentui statically included?

bcardarella avatar Jan 03 '26 04:01 bcardarella

Oh I was talking to him since he is running dev directly, you arent. You wouldnt have this change im referring to

rekram1-node avatar Jan 03 '26 04:01 rekram1-node

@arsham could also be this potentially: ff0bd84

@rekram1-node good catch. I'll revert this locally and will report back.

arsham avatar Jan 03 '26 08:01 arsham

@rekram1-node it was unrelated to this commit, might be my own setup.

arsham avatar Jan 03 '26 17:01 arsham