Skip to content

GUI: Reduce CPU usage II - have smoother UX with faster refresh rate#1163

Merged
khronokernel merged 1 commit intodortania:mainfrom
goneng:fix_high_cpu
Apr 13, 2025
Merged

GUI: Reduce CPU usage II - have smoother UX with faster refresh rate#1163
khronokernel merged 1 commit intodortania:mainfrom
goneng:fix_high_cpu

Conversation

@goneng
Copy link
Copy Markdown
Contributor

@goneng goneng commented Apr 5, 2025

  • Set thread_sleep_interval to 0.01s for better UI responsiveness
  • Improve thread waiting with thread.join() where applicable (thanks to @sbytnar)

@goneng
Copy link
Copy Markdown
Contributor Author

goneng commented Apr 5, 2025

Guys, please review when you have a minute -
I went with a simplified version of the fix, to keep the code clear - as suggested:

  1. Shorter sleep-interval for higher refresh-rate - thanks @khronokernel
  2. Replace time.sleep(...) with thread.join(...) where applicable - thanks @sbytnar

* Set thread_sleep_interval to 0.01s for better UI responsiveness
* Improve thread waiting with thread.join() where applicable (thanks to @sbytnar)
@khronokernel khronokernel merged commit 2be8934 into dortania:main Apr 13, 2025
2 checks passed
@khronokernel
Copy link
Copy Markdown
Member

Sorry for the delay, got too caught up with work. Looks great to me, thank you again!

@goneng goneng deleted the fix_high_cpu branch April 13, 2025 07:17
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