-
Notifications
You must be signed in to change notification settings - Fork 22
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 for _reaper
#44
Comments
Just switching from |
The whole reason the Yeah, I should probably throttle the frequency at which the Either that, or come up with a more elegant mechanism. |
asyncio is only maintaining weak references to task. To avoid them being destroyed while still pending, we need to keep a reference on them. Previously, a function was scheduled at each tick to cleanup done tasks. Instead, we add a callback to the task to cleanup its own reference when done. Fix ldo#44.
Hey!
After profiling a program, I have noticed that the
_reaper
function is called very often and responsible for some quite CPU usage due to this. From my understanding, it is running at each tick as long as there is a DBus related task running, which is always if you are listening for signals.I would suggest to just sleep a bit inside reaper.
The text was updated successfully, but these errors were encountered: