Opened 12 years ago
Closed 12 years ago
#4160 defect closed duplicate (duplicate)
LineReceiver string buffering
Reported by: | varela | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | core | Keywords: | |
Cc: | Branch: | ||
Author: |
Description
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.
Attachments (1)
Change History (3)
Changed 12 years ago by
comment:1 Changed 12 years ago by
Milestone: | Twisted-9.0+1 |
---|---|
Resolution: | → duplicate |
Status: | new → closed |
Type: | enhancement → defect |
Duplicate of #2611.
comment:2 Changed 11 years ago by
Owner: | Glyph deleted |
---|
Note: See
TracTickets for help on using
tickets.
LineReceiver vs array buffering benchmark