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

Seems to be sucking up CPU time #14

Open
Hollaar opened this issue Sep 11, 2017 · 1 comment
Open

Seems to be sucking up CPU time #14

Hollaar opened this issue Sep 11, 2017 · 1 comment

Comments

@Hollaar
Copy link

Hollaar commented Sep 11, 2017

Just starting OSCWidgets with a five-button control window results in it using close to 50% of the CPU, as indicated by Process Explorer. Processor is an Intel Pentium G640 at 2.8 GHz, operating system is Windows 10 Home.

@laseranichris
Copy link
Contributor

The problem is caused by the LogFile thread:
Even if OSCWidgets is idle (no controls) it consumes all CPU cycles of one core.

By adding a short sleep the problem is solved.

Because the messages are buffered, the sleep can be as long as desired.
I decided to sleep for 100ms.

I uploaded a commit with this fix:

commit d6aff61

I also created a pull request:

#17

Hope this helps!

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

No branches or pull requests

2 participants