Mirror of mitogen
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
Alex Willmer 83b6cdb616 ansible_mitogen: Speedup startup by not sending `__main__`
On my laptop his reduces the time to execute `ansible -mping ...` by approx
300 ms with `strategy=mitogen_linear`.

Until this commit Mitogen was unnecessarily sending large chunks of Ansible
from the controller to targets, due to `__main__` being identified as a
related module of `ansible.module_utils.basic`, and resolving to something
within `ansible.cli...`.

On Ansible target hosts executing any Ansible Module `__main__` is imported by
`ansible.module_utils.basic` as part of Ansible's module delivery mechanism.
When `mitogen.master.ModuleResponder` (on the controller) processes the
request for `ansible.module_utils.basic` from the target, it scans
`ansible.module_utils.basic` for related imports and finds `__main__`. However
`__main__` on the controller is not the same module as `__main__` on the
target. On the controller it is a module in `ansible.cli...` that implements
one of the ansible commands (e.g. `ansible`, `ansible-playbook`).
7 days ago
.ci CI: Add OS release coverage: Ubuntu 22.04, Ubuntu 24.04 7 days ago
.github CI: Bump deprecated macOS 13 runner to macOS 15 1 week ago
ansible_mitogen ansible_mitogen: Remove maximum Ansible version check 3 weeks ago
docs ansible_mitogen: Speedup startup by not sending `__main__` 7 days ago
examples Remove get_password_hash, unused 1 year ago
mitogen ansible_mitogen: Speedup startup by not sending `__main__` 7 days ago
scripts add Python3 compatibility 2 years ago
tests CI: Add OS release coverage: Ubuntu 22.04, Ubuntu 24.04 7 days ago
.gitignore ci: Add playbook to configure container host for image prep 1 week ago
LICENSE Bump copyright year and use generic author name (testing Travis) 5 years ago
MANIFEST.in setup.py: include LICENSE; closes #538. 7 years ago
README.md CI: Remove integration of retired lgtm.com 3 weeks ago
dev_requirements.txt Split dev_requirements.txt up according to test mode. 7 years ago
netlify.toml docs: Attempt to configure Netlify build of mitogen.networkgenomics.com 11 months ago
preamble_size.py preamble_size: Fix variability of command & preamble(?) size 3 months ago
run_tests tests: Remove unittest2, use stdlib unittest 4 years ago
setup.cfg Keep comatibility with `setuptools` tagging wheels with `py2.py3` 6 months ago
setup.py Declare license as SPDX identifier in metadata 1 month ago
tox.ini CI: Add OS release coverage: Ubuntu 22.04, Ubuntu 24.04 7 days ago

README.md