LineReceiver string buffering

[email protected] Tue, 08 Dec 2009 16:43:16 -0000
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from varela <None>:

Some days ago I found that code in twisted.protocols.basic.LineReceiver is not good optimized. You used string adding in dataReceived function. But string is immutable object, so in each addition you create new instance of String. When line too large and data chunks very small it consume too much recourses.
I've create test example with array buffers, you can found it in attach.


----------
Type     : enhancement
Component: core
Keywords : 
Priority : low
Nosy     : 
----------
http://twistedmatrix.com/trac/ticket/4160