urllib2 urlopen takes too much time

  • Thread starter Filip GruszczyÅ„ski
  • Start date
F

Filip Gruszczyński

I have encountered a performance problem using suds, which was traced
down to _socket.recv. I am calling some web services and each of them
uses about 0.2 sec and 99% of this time is spent on urllib2.urlopen,
while the rest of the call is finished in milliseconds. Because of
this, my web app works really slow, especially when it must do many ws
calls. I could of course decrease the number of calls and do a lot of
caching (which would be quite perilous and I wouldn't like to delve
into this), but it seems as treating symptoms, rather than the illness
itself.

The machine I am connecting to through ws is in the same building, the
connection should be really fast and mostly it is - except for using
suds. Is it possible, that I could done something wrong and it hangs
on this socket for too long? Have anyone encountered similar problems?
Oh, and we did some profiling using also other tool written in C#,
that also uses those web services and it worked much faster, so it
doesn't seem to be connection problem.
 
A

Aahz

I have encountered a performance problem using suds, which was traced
down to _socket.recv. I am calling some web services and each of them
uses about 0.2 sec and 99% of this time is spent on urllib2.urlopen,
while the rest of the call is finished in milliseconds.

What happens if you use urlopen() by itself?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top