New submission from Kristján Valur Jónsson <krist...@ccpgames.com>:

the socket._fileobject._wbuf is a list of strings to output.  This patch 
keeps the length of this buffer as a separate member variable, rather than  
computing it dynamically, which sums to a O(n**2) operation as the buffer 
is filled up.  Significant performance degradation was observed when 
outputting lots of small data to a buffered socket using the old method.

----------
files: socket.patch
keywords: easy, needs review, patch, patch
messages: 88366
nosy: krisvale
severity: normal
status: open
title: Fix O(n**2) performance problem in socket._fileobject
type: performance
versions: Python 2.7
Added file: http://bugs.python.org/file14080/socket.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6117>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to