Giter Club home page Giter Club logo

Comments (8)

dcbaker avatar dcbaker commented on June 28, 2024 2

Has there been any movement on this issue?

from urwid.

NicolasLM avatar NicolasLM commented on June 28, 2024 1

For anyone stumbling upon this issue, this Github page links to a fork that actually solves the problem without using polling at all: BouncyMaster#1

I have been using it for a while and the difference is striking: the application is responsive while keeping the CPU at zero when not in use. I recommend urwid maintainers to consider merging this code as an alternative asyncio implementation.

from urwid.

tdryer avatar tdryer commented on June 28, 2024

Related: #86

from urwid.

rndusr avatar rndusr commented on June 28, 2024

Oops, sorry for the duplicate.

from urwid.

wardi avatar wardi commented on June 28, 2024

#86 is a related PR, but not a real fix for the issue. Repoening until we do have a fix for AsyncioEventLoop.

from urwid.

dcbaker avatar dcbaker commented on June 28, 2024

I'll elaborate, I work on alot, which uses urwid. When we ported to python 3 I wanted to move from twisted to asyncio because we don't use twisted for anything except for asynchronous operations, but having the program idle at 5-10% CPU usage is pretty bad, doing nothing but switching back to twisted made that overhead go away.

from urwid.

jsheedy avatar jsheedy commented on June 28, 2024

The default value of AsyncioEventLoop._idle_emulation_delay (1/256) seems small to me. I've been doing as @rndusr suggests and dial it back to about 1/15. With that everything is responsive and CPU usage is reasonable. Is there any reason not to set the default value to 1/20 or even less?

from urwid.

tonycpsu avatar tonycpsu commented on June 28, 2024

7c8cd1e has been pushed as a workaround, as described in #86.

from urwid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.