[GH-ISSUE #147] High CPU utilization with only command keys? #121

Closed
opened 2026-05-05 04:57:57 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @alex-hall on GitHub (Oct 24, 2019).
Original GitHub issue: https://github.com/keycastr/keycastr/issues/147

Not sure if this is to be expected or not, but i'm seeing high CPU utilization when doing heavy shortcut work while programming.

Screen Shot 2019-10-24 at 11 59 28 AM

On Mac OSX Mojave and i've checked the option "display only command keys". Additionally, i've tried to turn off the fade effect as I understand that may have an impact on performance, nothing seems to solve the problem.

If I send commands back-to-back, I even see CPU spikes up to 400%.

Any ideas? Let me know if I need to provide any additional details.

EDIT:

Looks like this issue ONLY occurs with the default visualizer. The Svelte one doesn't seem to have this problem.

Originally created by @alex-hall on GitHub (Oct 24, 2019). Original GitHub issue: https://github.com/keycastr/keycastr/issues/147 Not sure if this is to be expected or not, but i'm seeing high CPU utilization when doing heavy shortcut work while programming. <img width="371" alt="Screen Shot 2019-10-24 at 11 59 28 AM" src="https://user-images.githubusercontent.com/5599279/67503729-29c66900-f656-11e9-9923-aea38e7b13a2.png"> On Mac OSX Mojave and i've checked the option "display only command keys". Additionally, i've tried to turn off the fade effect as I understand that may have an impact on performance, nothing seems to solve the problem. If I send commands back-to-back, I even see CPU spikes up to 400%. Any ideas? Let me know if I need to provide any additional details. EDIT: Looks like this issue ONLY occurs with the default visualizer. The Svelte one doesn't seem to have this problem.
Author
Owner

@akitchen commented on GitHub (Oct 24, 2019):

is this simply about the app appearing in the list of apps consuming significant energy? or was this only noticed in a specific case -- default visualizer and command keys only?

I seem to recall that a significant portion of CPU utilization is incurred when managing the animation of the bubble views' positions, but it's been a while since I focused on it in the profiler. If you have any ideas and are interested in contributing, a PR would be most welcome here

but I also think this is due at least in part to the app requiring high-performance GPU on devices capable of GPU switching. It's something we need to address, because I don't think it's really needed, it's simply a legacy of the age of this codebase (10 years!)

<!-- gh-comment-id:546075689 --> @akitchen commented on GitHub (Oct 24, 2019): is this simply about the app appearing in the list of apps consuming significant energy? or was this only noticed in a specific case -- default visualizer and command keys only? I seem to recall that a significant portion of CPU utilization is incurred when managing the animation of the bubble views' positions, but it's been a while since I focused on it in the profiler. If you have any ideas and are interested in contributing, a PR would be most welcome here but I also think this is due at least in part to the app requiring high-performance GPU on devices capable of GPU switching. It's something we need to address, because I don't think it's really needed, it's simply a legacy of the age of this codebase (10 years!)
Author
Owner

@alex-hall commented on GitHub (Oct 25, 2019):

Sorry I think my edit got in a little late. This is ONLY noticed with the default visualizer, not the Svelte one. (The svelte didn't go past 7% CPU no matter how much I hammered on the keys).

I do have a newer macbook pro that has a discreet GPU, but i'm mostly seeing high CPU %, not GPU%.

In terms of contributing, i'd like to, but also have no experience with Objective C. If there is a hotspot in the codebase where you think it would be prudent to look, I can certainly take a stab at it.

<!-- gh-comment-id:546324802 --> @alex-hall commented on GitHub (Oct 25, 2019): Sorry I think my edit got in a little late. This is ONLY noticed with the default visualizer, not the Svelte one. (The svelte didn't go past 7% CPU no matter how much I hammered on the keys). I do have a newer macbook pro that has a discreet GPU, but i'm mostly seeing high CPU %, not GPU%. In terms of contributing, i'd like to, but also have no experience with Objective C. If there is a hotspot in the codebase where you think it would be prudent to look, I can certainly take a stab at it.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/keycastr#121
No description provided.