Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I see this alot with Ansible. Its not particularly slow but running it places a bigger burden on laptop cpu and fans than I'd imagined.


Noticed the same too. It is likely that we are both impacted by the very aggressive default of 1ms for `internal_poll_interval`: https://github.com/ceph/ceph-cm-ansible/pull/308


Huh, polling with a sleep() rather than a proper event wait seems like a bad code smell there...


How so? This is almost certainly what the internals of a packaged event wait would look like.


It could use a Queue of some kind rather than just pushing onto a deque between threads [1]? Then it would idly wait for the results_thread_main to push results.

I guess that might be what Mitogen does (along with other improvements), a faster Ansible strategy [2].

[1] https://github.com/ansible/ansible/blob/becf9416736dc911d341...

[2] https://github.com/mitogen-hq/mitogen/blob/master/docs/ansib...


Thanks for the heads up, i'll give that a go :)




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: