summary refs log tree commit diff
path: root/synapse/http/server.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-07-22 00:24:56 +0100
committerRichard van der Hoff <richard@matrix.org>2020-07-22 00:24:56 +0100
commit2ccd48e9215cb78934665454235c3e33bf07772c (patch)
treea7ac768d070d0edfd73058bdc2df7a5231448789 /synapse/http/server.py
parentConvert room list handler to async/await. (#7912) (diff)
downloadsynapse-2ccd48e9215cb78934665454235c3e33bf07772c.tar.xz
fix an incorrect comment
Diffstat (limited to 'synapse/http/server.py')
-rw-r--r--synapse/http/server.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/http/server.py b/synapse/http/server.py
index cff49202f4..8e003689c4 100644
--- a/synapse/http/server.py
+++ b/synapse/http/server.py
@@ -575,8 +575,8 @@ def respond_with_json_bytes(
     if send_cors:
         set_cors_headers(request)
 
-    # todo: we can almost certainly avoid this copy and encode the json straight into
-    # the bytesIO, but it would involve faffing around with string->bytes wrappers.
+    # note that this is zero-copy (the bytesio shares a copy-on-write buffer with
+    # the original `bytes`).
     bytes_io = BytesIO(json_bytes)
 
     producer = NoRangeStaticProducer(request, bytes_io)