Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Peek] Fix idle CPU usage #29665

Merged
merged 1 commit into from
Nov 6, 2023
Merged

Conversation

davidegiacometti
Copy link
Collaborator

Summary of the Pull Request

  • The idle CPU usage happen when the window is initialized without activation. A thread hang wasting CPU cycles until the window is initialized

1
0.75

2
0.0.1

  • Can't really see the CPU usage on my workstation but I have notices the battery/CPU usage on a laptop when I barely use Peek (probably due to smaller CPU compared to the workstation). The incriminated thread is present on both machines.

3
0.75

4
0.0.1

PR Checklist

Detailed Description of the Pull Request / Additional comments

  • Moved the event that listen the Peek hotkey from window level to app level
  • Instantiate the window when Peek is invoked for the first time

Validation Steps Performed

Copy link
Collaborator

@jaimecbernardo jaimecbernardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Only create resources when used seems like a good change. All the better if it fixes the weird CPU issue.
Thank you for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants