Rishi added the comment:

Hi,
I have created a new patch with a small design change. The change is that in 
situations where I don't find the boundary instead of keeping the last x bytes 
in the buffer I simply drain the whole data and call a readline(). 
This seems like the right thing to do also. I managed to get rid of the two 
obfuscated helper functions keep_x_buffer and remove_x_buffer that I had and 
the code should look familiar (I hope) to a module owner.
This also helped me get rid of quite a few class member variables that I could 
move to locals of my main function(multi_read).
I still need to maintain an overlap, but only for the trailing CRLF boundary. 
Ran all the new and old tests and tested on apache with the ubuntu iso server 
image. Without the patch ubuntu iso server image took 93seconds .. with the 
patch it took 25seconds.

----------
Added file: http://bugs.python.org/file37149/issue1610654_3.patch

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

Reply via email to