socketify.py icon indicating copy to clipboard operation
socketify.py copied to clipboard

Regression in v0.0.28: high CPU consumption in idle mode

Open Aksem opened this issue 1 year ago • 5 comments

Running server eats the whole CPU core without a reason(=consumes 12.5% of CPU in 8 Core system).

To Reproduce Steps to reproduce the behavior:

  1. Use socketify v0.0.28.
  2. Start the simple server from official example:
from socketify import App

app = App()
app.get("/", lambda res, req: res.end("Hello World socketify from Python!"))
app.listen(3000, lambda config: print("Listening on port http://localhost:%d now\n" % config.port))
app.run()
  1. Check CPU consumption of the process.

Expected behavior CPU consumption should be low.

Screenshots

Desktop:

  • OS: Linux (openSUSE Tumbleweed)
  • Browser: -
  • Version: -

Additional context v0.0.27 works as expected

Aksem avatar Jul 28 '24 12:07 Aksem

After 5s the CPU consumption was still high?

cirospaciari avatar Jul 29 '24 20:07 cirospaciari

Yes, it stays high as long as the process runs(tried to keep for 5 minutes in the last test of minimal example).

Aksem avatar Jul 30 '24 04:07 Aksem

Ok will revert the last change on this thing before publishing the new version Thanks for the feedback

cirospaciari avatar Jul 31 '24 18:07 cirospaciari

Can confirm, it goes brrrrr on 0.0.28, needed to downgrade to 0.0.27.

Any preview for release? BOM TRABALHO DOUTOR!

ArthoPacini avatar Aug 21 '24 11:08 ArthoPacini

Sorry the delay, I just move to San Francisco CA but will release this week! sorry about that!

VLW MANO bora fazer isso ficar melhor hahah vou me dedicar mais \o

cirospaciari avatar Aug 21 '24 17:08 cirospaciari