dlvhdr / gh-dash

A beautiful CLI dashboard for GitHub 🚀
https://dlvhdr.github.io/gh-dash
MIT License
6.77k stars 191 forks source link

[BUG]: unexpected amount of CPU usage #403

Open Ax51 opened 4 days ago

Ax51 commented 4 days ago

Describe the bug A clear and concise description of what the bug is.

Just running the extension consumes about a quarter of the CPU resources. This behaviour is unexpected

To Reproduce Steps to reproduce the behavior:

  1. Open Activity Monitor app
  2. Go to the terminal and open extension
  3. Return to Activity Monitor app and check for gh dash process name

Expected behavior A clear and concise description of what you expected to happen.

Consume less cpu %. For example running kitty instance consumes just about 0.6% of cpu. actively running eslint_d instance consumes not more than 15%.

Screenshots If applicable, add screenshots to help explain your problem.

image

Desktop (please complete the following information):

Update:

Used extension ver.: 4.3.0 image

Omnikron13 commented 7 hours ago

Doesn't behave this way for me, but then I'm on x64, and you're running on an ARM architecture, not to mention Linux vs. macOS...

I have an ARM board I'm planning to get up and running in the next few days, so I can check there, see if anything is different.

Better would be if you could generate a CPU profile. The changes in this branch are all you actually need to generate one: https://github.com/Omnikron13/gh-dash/tree/cpu-profile

go tool pprof cpu.profile after you close out the profiling build of gh-dash will open up the interactive tool google ship for probing the profile.

The top10 command might shed some light on what is actually using CPU cycles, or the web command should generate a nice visualisation of where they're all going in your browser.