From: Navkirat Singh on
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.

I am new to this.

Warm regards,
Nav
From: MRAB on
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.
>
> I am new to this.
>
Interleaving processing and sending/receiving might reduce throughput
because when you're processing the socket is idle (depending on how much
buffering there is). You could do the socket stuff in another thread so
that it's not waiting for the processing to finish while there is data
available, and use a queue to transfer the data between that thread and
the processing thread.
From: MRAB on
Navkirat Singh wrote:
> Thanks for the info : ). I will look into it ! Right now I am having a
> strange problem. I am trying to use cookies and the import function
> returns an error:
>
> I am using python 3:
>
> from http import cookies
>
> *importError:* No module named http
>
> Is it my configuration or has something changed since the documentation
> was written? Sorry I might be asking too many question, I am pretty new
> to this stuff and kinda feel lost here and there : (
>
It works for me (Python 3.1.2).
From: Lawrence D'Oliveiro on
In message
<mailman.1097.1279930004.1673.python-list(a)python.org>, Navkirat Singh wrote:

> I had a question, programming sockets, what are the things that would
> degrade performance and what steps could help in a performance boost?

Remember the old saying, “premature optimization is the root of all evil”.

Have you actually got some code working properly first, before worrying
about how good or bad its performance is?

--
Lawrence
trying not to say “performant” :)
From: Navkirat Singh on

On 25-Jul-2010, at 6:45 AM, Lawrence D'Oliveiro wrote:

> In message
> <mailman.1097.1279930004.1673.python-list(a)python.org>, Navkirat Singh wrote:
>
>> I had a question, programming sockets, what are the things that would
>> degrade performance and what steps could help in a performance boost?
>
> Remember the old saying, “premature optimization is the root of all evil”.
>
> Have you actually got some code working properly first, before worrying
> about how good or bad its performance is?
>
> --
> Lawrence
> trying not to say “performant” :)
> --
> http://mail.python.org/mailman/listinfo/python-list

I agree with you, it was just for the sake of knowledge. Its always good to have a map right?