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.
When the interpreter is modern enough, use zlib.compressobj() to
pre-compress the unchanging parts of the bootstrap once, then use
compressobj.copy() to append just the context's config during stream
construction.
Before: 100 loops, best of 3: 5.81 msec per loop
After: 10000 loops, best of 3: 35.9 usec per loop
With 100 targets this is enough to knock 6 seconds off startup, at 500
targets it becomes half a minute.
Test 'program':
python -m timeit -s '
import mitogen.parent as p;
import mitogen.master as m;
r=m.Router();
s=p.Stream(r, 0, max_message_size=1);
r.broker.shutdown()'\
\
's.get_preamble()'
|
7 years ago | |
|---|---|---|
| .ci | 7 years ago | |
| .github | 7 years ago | |
| ansible_mitogen | 7 years ago | |
| docs | 7 years ago | |
| examples | 7 years ago | |
| mitogen | 7 years ago | |
| scripts | 7 years ago | |
| tests | 7 years ago | |
| .gitignore | 7 years ago | |
| .lgtm.yml | 8 years ago | |
| .travis.yml | 7 years ago | |
| LICENSE | 8 years ago | |
| README.md | 7 years ago | |
| dev_requirements.txt | 7 years ago | |
| preamble_size.py | 8 years ago | |
| run_tests | 7 years ago | |
| setup.cfg | 8 years ago | |
| setup.py | 7 years ago | |
| tox.ini | 7 years ago | |
