Running spinner uses a lot of CPU
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.831.20005
What subscription do you have?
Pro
What platform is your computer?
Arch Linux 7.2.2-arch1-1 x86_64, Plasma Wayland
What issue are you seeing?
When a thread is running, the rotating spinner in the sidebar on the left takes around 40% of a single core (on intel i5-5300U CPU).
If I scroll the sidebar so the spinners are not visible, the cpu usage drops by around 40%.
What steps can reproduce the bug?
Start a thread, tell it to "sleep for 5 minutes", click on another thread, then with btop observe cpu usage when the thread running spinner is visible on the left sidebar, or when you scroll down such that it is not visible.
What is the expected behavior?
A tiny spinner shouldn't use so much more CPU than playing a basic computer game.
Additional information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue by starting a thread, switching to another thread, and comparing CPU usage while the running spinner is visible versus scrolled out of view. Trace the sidebar spinner implementation and measure the result with btop; done means the running indicator remains visible without the reported excessive CPU usage.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100