Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge remote-tracking branch 'ei-grad/master'

  • Loading branch information...
commit 227becd6d12cb5646f7fc8036e1e3faec6d9f408 2 parents f41306d + b8e4466
Ben Darnell authored May 26, 2012

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. 6  tornado/iostream.py
6  tornado/iostream.py
@@ -192,7 +192,11 @@ def write(self, data, callback=None):
192 192
         if data:
193 193
             # We use bool(_write_buffer) as a proxy for write_buffer_size>0,
194 194
             # so never put empty strings in the buffer.
195  
-            self._write_buffer.append(data)
  195
+            if len(data) > 128*1024:
  196
+                for i in range(0, len(data), 128*1024):
  197
+                    self._write_buffer.append(data[i:i+128*1024])
  198
+            else:
  199
+                self._write_buffer.append(data)
196 200
         self._write_callback = stack_context.wrap(callback)
197 201
         self._handle_write()
198 202
         if self._write_buffer:

0 notes on commit 227becd

Please sign in to comment.
Something went wrong with that request. Please try again.