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.
mitogen/docs
Alex Willmer 0e5f47f145 mitogen: Refactor scan_code_imports() as mitogen.imports.codeobj_imports()
This replaces `mitogen.master.scan_code_imports()` with
`mitogen.imports.codeobj_imports()`. The Python 3.x implementation now uses
`str.find()`, relying on Python >= 3.6 "widecode" format. Behaviour and
semantics should be unchanged. Now implementations are approx
- 1.5 x faster on Python 2.x
- 2 - 3 x faster on Python 3.x

Before
```console
$ ./tests/bench/scan_code
scan_code_imports python2.7  100 loops, best of 3: 3.19 msec per loop
scan_code_imports python3.9  500 loops, best of 5: 685 usec per loop
scan_code_imports python3.10  500 loops, best of 5: 727 usec per loop
scan_code_imports python3.11  500 loops, best of 5: 601 usec per loop
scan_code_imports python3.12  500 loops, best of 5: 609 usec per loop
scan_code_imports python3.13  500 loops, best of 5: 586 usec per loop
```

After
```console
codeobj_imports python2.7  1000 loops, best of 3: 1.98 msec per loop
codeobj_imports python3.9  1000 loops, best of 5: 302 usec per loop
codeobj_imports python3.10  1000 loops, best of 5: 297 usec per loop
codeobj_imports python3.11  1000 loops, best of 5: 243 usec per loop
codeobj_imports python3.12  1000 loops, best of 5: 278 usec per loop
codeobj_imports python3.13  1000 loops, best of 5: 259 usec per loop
```
```console
$ uname -a
Darwin kintha 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:29 PDT
2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6000 arm64
```
4 months ago
..
_static docs: remove a little more top margin wastage 7 years ago
_templates docs: Remove piwik analytics hooks from website 1 year ago
images issue #505: docs: add new detail graph for one scenario. 7 years ago
.gitignore docs: fix intensely annoying _prefix, 2 years later. 8 years ago
Makefile docs: get rid of autobuild remnant 7 years ago
ansible_detailed.rst Update missing host key checking argument in docs/ansible_detailed.rst 5 months ago
api.rst Add podman connection support 4 years ago
changelog.rst mitogen: Refactor scan_code_imports() as mitogen.imports.codeobj_imports() 4 months ago
conf.py docs: Fix website download link when there is a pre-release 6 months ago
contributors.rst docs: Add changelog, credits for connection_loader__get fixes 11 months ago
domainrefs.py docs: add domainrefs plugin to make link aliases everywhere \o/ 6 years ago
examples.rst Replace os.system() with subprocess.check_call() 4 years ago
getting_started.rst Fix for sample in doc 6 years ago
howitworks.rst trivia: Fix trailing whitespace 1 year ago
index.rst docs: Update external URLs (e.g. dw/mitogen -> mitogen-hq/mitogen) 2 years ago
internals.rst Merge devel/290 @ 79b979ec8544ef5d8620c64068d4a42fabf50415 6 years ago
netlify.toml docs: Fix "No module named 'imghdr'" when building website 11 months ago
pickle-substitutes.ods docs: First round of Pickle-likes survey 8 years ago
requirements.txt docs: Fix generation of static website 2 years ago
services.rst issue #589: ensure real FileService/PushFileService are in the docs 7 years ago
toc.rst docs: reorder chapters 6 years ago