On 7/23/2010 5:06 PM, Navkirat Singh wrote:
Hey Everyone,

I had a question, programming sockets, what are the things that would
degrade performance and what steps could help in a performance boost? I
would also appreciate being pointed to some formal documentation or
article.


   1.  When writing to a TCP socket, write everything you have to write
       with one "send" or "write" operation if at all possible.
       Don't write a little at a time.  That results in sending small
       packets, because sockets are "flushed" after each write.

   2.  Wait for input from multiple sources by using "select".  (But
       be aware that "select" doesn't work for Windows pipes.)

                                John Nagle
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to