Yelp/python-gearman — pull request #33 by malor (2013-02-14 23:12:47+00:00)
Title: Slow handling of connection incoming buffer

A connection incoming buffer is extended using += operator. This leads
to unnecessary memory allocations and significant performance drops when
transferring big amounts of data (i. e. a few megabytes). Using of the array('c')
(an array of bytes) data type enables us to handle incoming data efficiently.

I used this dummy code for testing:
worker: http://xsnippet.org/359371/
client: http://xsnippet.org/359372/
binary data: dd if=/dev/urandom of=data.bin bs=512 count=10000