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

Fix excessive CPU usage in tracker #386

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

robojumper
Copy link
Contributor

What does this address?

https://discord.com/channels/1187045091077017651/1253088407106621602

  • paintEvent calls setStylesheet, which appears to be one of the many other reasons a paintEvent can be issued again.
  • As a result, parts of the tracker repaint every frame
  • This causes excessive CPU usage

How did/do you test these changes?

  • Open tracker, track some gratitude crystals
  • Resize window
  • Observe CPU usage

Notes

  • This is the minimal set of changes that fixes the issue. There might be other code in this paintEvent that strictly speaking doesn't belong there and just so happens to not trigger the issue.

@YourAverageLink YourAverageLink merged commit 15a0eec into mint-choc-chip-skyblade:main Jun 25, 2024
1 check passed
@robojumper robojumper deleted the cpu-usage branch June 25, 2024 06:34
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