Absurd amount of cpu and memory usage when doing pah completion #357

Open
opened 2026-02-16 17:26:25 -05:00 by yindo · 13 comments
Owner

Originally created by @MuntasirSZN on GitHub (Jun 28, 2025).

Originally assigned to: @thdxr on GitHub.

Its kind of like a forkbomb, I am using github copilot and cpu goes 100% and same for memory, i typed .local/share and its going flames. On latest.

Originally created by @MuntasirSZN on GitHub (Jun 28, 2025). Originally assigned to: @thdxr on GitHub. Its kind of like a forkbomb, I am using github copilot and cpu goes 100% and same for memory, i typed .local/share and its going flames. On latest.
yindo added the bugperf labels 2026-02-16 17:26:25 -05:00
Author
Owner

@Sir-Goose commented on GitHub (Jun 28, 2025):

this happens to me as well but only when in my ~home directory. probably just because of the massive number of files and folders it has to search through

@Sir-Goose commented on GitHub (Jun 28, 2025): this happens to me as well but only when in my ~home directory. probably just because of the massive number of files and folders it has to search through
Author
Owner

@MuntasirSZN commented on GitHub (Jun 28, 2025):

this happens to me as well but only when in my ~home directory. probably just because of the massive number of files and folders it has to search through

Yeah true. Though fzf can do it.

@MuntasirSZN commented on GitHub (Jun 28, 2025): > this happens to me as well but only when in my ~home directory. probably just because of the massive number of files and folders it has to search through Yeah true. Though fzf can do it.
Author
Owner

@jeankvd commented on GitHub (Sep 22, 2025):

Image

+1, I Open on home directory and type @ and it goes off

@jeankvd commented on GitHub (Sep 22, 2025): <img width="521" height="101" alt="Image" src="https://github.com/user-attachments/assets/533d8641-967e-463c-8b5f-b468779e4994" /> +1, I Open on home directory and type `@` and it goes off
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Author
Owner

@MuntasirSZN commented on GitHub (Dec 27, 2025):

Yep still needed @rekram1-node

@MuntasirSZN commented on GitHub (Dec 27, 2025): Yep still needed @rekram1-node
Author
Owner

@MuntasirSZN commented on GitHub (Dec 27, 2025):

Maybe skim can help? Fzf takes a lot of ram. Also other ways can be taken other than using fzf or similar. I think fzf indexes from start on each run. Instead, opencode should maintain a index in the background. This will dramatically decrease ram usage on future runs (first runs will be slow, starting from 0)

@MuntasirSZN commented on GitHub (Dec 27, 2025): Maybe skim can help? Fzf takes a lot of ram. Also other ways can be taken other than using fzf or similar. I think fzf indexes from start on each run. Instead, opencode should maintain a index in the background. This will dramatically decrease ram usage on future runs (first runs will be slow, starting from 0)
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

what version are you using?

I don't think we use fzf anymore

@MuntasirSZN

@rekram1-node commented on GitHub (Dec 27, 2025): what version are you using? I don't think we use fzf anymore @MuntasirSZN
Author
Owner

@MuntasirSZN commented on GitHub (Dec 27, 2025):

what version are you using?

I don't think we use fzf anymore

@MuntasirSZN

Latest always... Idk but it may not be fzf anymore, I just looked at internals one day and never rechecked it. Though the issue persists.

@MuntasirSZN commented on GitHub (Dec 27, 2025): > what version are you using? > > I don't think we use fzf anymore > > @MuntasirSZN Latest always... Idk but it may not be fzf anymore, I just looked at internals one day and never rechecked it. Though the issue persists.
Author
Owner

@scarf005 commented on GitHub (Dec 27, 2025):

related: https://github.com/sst/opencode/issues/2585
seems opencode never releases large files read in memory

@scarf005 commented on GitHub (Dec 27, 2025): related: https://github.com/sst/opencode/issues/2585 seems opencode never releases large files read in memory
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

and u get this issue specifically with “@“? Because otherwise ill close we have a lot of related issues and this one is older

@rekram1-node commented on GitHub (Dec 27, 2025): and u get this issue specifically with “@“? Because otherwise ill close we have a lot of related issues and this one is older
Author
Owner

@MuntasirSZN commented on GitHub (Dec 27, 2025):

I don't have very large files in home dir, they are in hidden dirs like local or cache. I have a lot of small files, that can be said.

@MuntasirSZN commented on GitHub (Dec 27, 2025): I don't have very large files in home dir, they are in hidden dirs like local or cache. I have a lot of small files, that can be said.
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

But is it specifically hapening when you open the "@" completions bar in the tui?

@rekram1-node commented on GitHub (Dec 27, 2025): But is it specifically hapening when you open the "@" completions bar in the tui?
Author
Owner

@MuntasirSZN commented on GitHub (Dec 28, 2025):

But is it specifically hapening when you open the "@" completions bar in the tui?

Yes, specially in really large folders like home dir.

@MuntasirSZN commented on GitHub (Dec 28, 2025): > But is it specifically hapening when you open the "@" completions bar in the tui? Yes, specially in really large folders like home dir.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#357