Reduce WebSocket buffer slicing overhead
Use a `const unsigned char *` for the buffer as its
a lot faster than copying around PyBytes objects. We
do need to be careful that all slices are bounded
and we boundchecks everything to make sure we
do not do an out of bounds read. I checked that
all accesses to buf_cstr are preceeded by a boundchecks
but it would be good to get another set of eyes
on that to verify in the `self._state == READ_PAYLOAD` that
we will never try to read out of bounds.
218ec01
25 days ago
by bdraco
0%
changelog
498175a
25 days ago
by bdraco
-3%
Update aiohttp/_websocket/reader_py.py
Co-authored-by: Sam Bull <git@sambull.org>