Browse Source
In this, don't allocate copy, just return non-empty string. This helps with a standard pattern of buffering data in case of short reads: buf = b"" while ...: s = f.read(...) buf += s ... For a typical case when single read returns all data needed, there won't be extra allocation. This optimization helps uasyncio.pull/2140/head
Paul Sokolovsky
8 years ago
1 changed files with 7 additions and 0 deletions
Loading…
Reference in new issue