gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Slowness & CPU usage >200% on macOS

Open gregsadetsky opened this issue 1 year ago • 12 comments

Describe the bug

Typing in the CLI is extremely slow (characters take multiple seconds to show up), and the CPU usage is through the roof:

Image

Client information Please paste the full text from the /about command run from Gemini CLI. Also include which platform (MacOS, Windows, Linux)

│ CLI Version     0.1.1                         │
│ Model           gemini-2.5-pro                │
│ Sandbox         no sandbox                    │
│ OS              darwin                        │

Additional context

macOS 15.5, using zsh


I can't find an "easy" way to repro - but it happens pretty much every time I try to use the CLI. let me know if I can provide more info!

gregsadetsky avatar Jun 25 '25 16:06 gregsadetsky

Same for me trying both npx and install with npm. Also tried both Mac Terminal and Warp. Seems to happen quickest with @ a file and it loading suggestions.

CLI Version: 0.1.3 (.env API key auth)
Model: gemini-2.5-flash
Sandbox: no sandbox
Computer: M1 Macbook Pro, OS 15.5, 64GB

BradDuns avatar Jun 26 '25 23:06 BradDuns

When typing @., it becomes extremely slow, and even when entering directories starting with . like @.gemini/, no files are suggested at all.

│ CLI Version 0.1.7 │ │ Git Commit 55cc809 │ │ Model gemini-2.5-pro │ │ Sandbox no sandbox │ │ OS darwin │

yasuda0320 avatar Jun 30 '25 05:06 yasuda0320

I see the same thing on Linux - after typing @, entering further characters is incredibly laggy (i.e. multiple seconds per character!)

aspiers avatar Jun 30 '25 17:06 aspiers

Same error here.

Gemini CLI 0.1.9
Node v23.6.1
No Sandbox
MacOS 15.5

jpchavat avatar Jul 09 '25 15:07 jpchavat

Is everyone experiencing this typing @ or are people seeing this even without pressing @. The performance issues fetching autocomplete with @ are known and there is a fix on the way but I do want to make sure there is not an additional unrelated performance issue as well before closing this as a duplicate. https://github.com/google-gemini/gemini-cli/issues/3626

jacob314 avatar Jul 09 '25 18:07 jacob314

I've been using the CLI (version 0.1.9 now) a lot since my first issue 2 weeks ago, and the @ slowness issue has not happened again.

I still see CPU spikes when Gemini is working but can't repro it easily. Probably safe to close this issue then @jacob314 -- your call! Cheers

Image

gregsadetsky avatar Jul 09 '25 19:07 gregsadetsky

The performance issues fetching autocomplete with @ are known and there is a fix on the way

Great to hear!

but I do want to make sure there is not an additional unrelated performance issue as well before closing this as a duplicate. #3626

#3626 was only just filed 10 hours ago, so wouldn't it make more sense to close that one as the duplicate rather than this one?

aspiers avatar Jul 09 '25 23:07 aspiers

Is everyone experiencing this typing @ or are people seeing this even without pressing @. The performance issues fetching autocomplete with @ are known and there is a fix on the way but I do want to make sure there is not an additional unrelated performance issue as well before closing this as a duplicate. #3626

I do experience the error after typing @. Glad to know you're already working on #3626.

Is there any documentation on how to get more detailed logs or traces so I can provide more information for this or future cases? EDIT: Already found in https://github.com/google-gemini/gemini-cli/blob/main/CONTRIBUTING.md#debugging

jpchavat avatar Jul 10 '25 13:07 jpchavat

Found possible duplicate issues:\n\n- #3626: (0.9028466939926147)\n\n

gsquared94 avatar Jul 30 '25 21:07 gsquared94

My issue with a very long prompts and results is that the terminal is glitching Is there a way to make the terminal works fine with long texts?

amrgetment avatar Aug 07 '25 03:08 amrgetment

Can you attach a video showing what you see with very long prompts?

jacob314 avatar Aug 13 '25 22:08 jacob314

Resolving this issue due to a period of inactivity. Thank you for bringing this to our attention, and we're happy to revisit it if you reply with an update.

srithreepo avatar Sep 11 '25 18:09 srithreepo