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

Why are we limited to seconds for refresh timeout? #105

Open
StephenCarboni opened this issue Apr 3, 2021 · 2 comments
Open

Why are we limited to seconds for refresh timeout? #105

StephenCarboni opened this issue Apr 3, 2021 · 2 comments
Labels
Core Add for issues having to do with core functions Feature Request Add for a new feature request Renderer Issue has to do with Renderer
Milestone

Comments

@StephenCarboni
Copy link

I set it to less so I could see updates from threads faster and my computer did not explode. What potential issues are there?

@StephenCarboni StephenCarboni added the Feature Request Add for a new feature request label Apr 3, 2021
@StephenCarboni
Copy link
Author

Well, I notice the CPU usage is at 1% for 100ms and 2% for 50ms. Would it be feasible to give use a redraw/inform_change method so we can tell the library that state has changed? Sorry in advance if I don't know what I'm talking about.

@jwlodek
Copy link
Owner

jwlodek commented Apr 4, 2021

No particular reason I went with seconds other than I found seconds to be more intuitive. You should be able to pass in fractional values to get faster refreshes. As for the second question, you could try calling the _draw_widgets() function yourself on your PyCUI object instance, though I haven't tested anything like that myself. Ive thought about allowing something like this in a simpler way, but originally the library wasn't written in a way that it is trivial to integrate.

Basically I'd have to do some work to allow for breaking off the main draw thread and separate it from the key handling thread.

@jwlodek jwlodek added this to the v0.2.0 milestone Apr 4, 2021
@jwlodek jwlodek added Core Add for issues having to do with core functions Renderer Issue has to do with Renderer labels Apr 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Add for issues having to do with core functions Feature Request Add for a new feature request Renderer Issue has to do with Renderer
Projects
None yet
Development

No branches or pull requests

2 participants