-
Notifications
You must be signed in to change notification settings - Fork 15
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
High CPU usage when rest server running and idle (25% CPU) #41
Comments
When the server is idle (no requests) it should be taking up 0% CPU. Can you post some sample code for me to take a look at? |
Hi @scottoffen I tried with the sample provided in the repository, but the same result, so I decided to left a comment, maybe it's something else... I've tried also with other embedded webserver (https://github.com/unosquare/embedio) and the CPU is 0% when the server is idle. If you need more information, let me know. |
I used the
Probably the while loop inside... Thanks! |
That while loop takes up a lot. I already changed it to poll the server at a predefined number of seconds, but that isn't in a release yet. I'll be changing it again soon to something more performant, so expect that to change. Either way, when idle, the server takes up 0% cpu. |
Is it normal that when server is running the CPU usage is 25% no matter what? there is no activity and the CPU usage is 25% continously.
Can we do anything to make it idle?
The text was updated successfully, but these errors were encountered: