[issue32251] Add asyncio.BufferedProtocol
Yury Selivanov
report at bugs.python.org
Mon Dec 11 11:50:18 EST 2017
Yury Selivanov <yselivanov at gmail.com> added the comment:
>> Looks nice. Can it speed up aiohttp too?
> Yes.
> aiohttp uses own streams but public API and internal implementation are pretty close to asyncio streams.
> Moreover C accelerated HTTP parser should work with proposed BufferedProtocol seamlessly.
I did some benchmarks, and it looks like BufferedProtocol can make httptools up to 5% faster for relatively small requests < 10Kb. Don't expect big speedups there.
For asyncpg, benchmarks that fetch a lot of data (50-100Kb) get faster up to 15%. So we'll definitely use the BufferedProtocol in asyncpg.
For applications that need to handle megabytes of data per request (like Antoine's benchmark) the speedup will be up to 2x.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32251>
_______________________________________
More information about the Python-bugs-list
mailing list