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.
a3b4b459fa
Rather than slowly build up a Python string over time, we just store a deque of chunks (which, in a later commit, will now be around 128KB each), and track the total buffer size in a separate integer. The tricky loop is there to ensure the header does not need to be sliced off the full message (which may be huge, causing yet another spike and copy), but rather only off the much smaller first 128kb-sized chunk received. There is one more problem with this code: the ''.join() causes RAM usage to temporarily double, but that was true of the old solution too. Shall wait for bug reports before fixing this, as it gets very ugly very fast. |
7 years ago | |
---|---|---|
ansible_mitogen | 7 years ago | |
docs | 7 years ago | |
examples | 7 years ago | |
mitogen | 7 years ago | |
tests | 7 years ago | |
.gitignore | 7 years ago | |
.lgtm.yml | 7 years ago | |
.travis.yml | 7 years ago | |
LICENSE | 7 years ago | |
README.md | 7 years ago | |
dev_requirements.txt | 7 years ago | |
preamble_size.py | 7 years ago | |
setup.cfg | 7 years ago | |
setup.py | 7 years ago | |
test.sh | 7 years ago | |
tox.ini | 7 years ago |