Comments (8)
Has there been any movement on this issue?
from urwid.
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.
Related: #86
from urwid.
Oops, sorry for the duplicate.
from urwid.
#86 is a related PR, but not a real fix for the issue. Repoening until we do have a fix for AsyncioEventLoop.
from urwid.
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.
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.
7c8cd1e has been pushed as a workaround, as described in #86.
from urwid.
Related Issues (20)
- Remove .DS_Store
- [BUG] `Text.render()` raises `CanvasError` for some non-UTF-8 encodings when `1 <= maxcols < 3`
- [BUG] urwid.widget.pile.PileError: added content invalid: [(<SignalWrap selectable box widget>,(<WHSettings.WEIGHT: 'weight'>, 0.5))] HOT 2
- [BUG?] unsupported operand type(s) for +: 'ParentNode' and 'int' HOT 1
- [BUG] 2.4.2 introduced regression (or maybe the original code was wrong all along) HOT 10
- [BUG] Too many items in ListBox with ScrollBar tanks performance HOT 1
- [BUG] `MainLoop.watch_pipe` is closed after the first callback HOT 4
- [BUG] urwid.Overlay valign doesn't accept `relative` any more HOT 2
- [Question] how to update interface but not Block interface? HOT 5
- [BUG] Not receiving 'shift mouse press' events HOT 7
- [BUG] Type hints for Widget `row()` method are inconsistent with usage
- [BUG] ListBox wrapped in AttrMap is not scrollable with ScrollBar HOT 1
- [Question]how can i input Chinese encoding into the Edit widget? HOT 3
- How to scroll two listboxes together? HOT 4
- resume (fg) from suspend (^Z) doesn't work inside a shell script HOT 1
- [BUG] interface changes make example/browser.py doesn't work as before HOT 2
- [BUG] Test suite fails if `trio` is installed without `exceptiongroup` HOT 1
- Creating a GridFlow with no children raises a warning HOT 1
- [docs] Specify that Windows support is available only on Windows 10 or later
- [BUG] ScrollBar does not indicate mouse_event was handled with ListBox
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from urwid.