On different occasions I noticed that urllib2 (as well as lower-level httplib) was slow at opening remote pages, which was strange as usually GET <url> was doing much better in terms of performance. A few days ago, being tired of this strange problem, I said "enough!" to myself.
A quick scan on what was going on behind the curtains revealed that it was the DNS lookup in Python library that was the bottleneck, and that the whole problem had been known for some time:
Fortunately, according to this message, it should be possible to fix the problem by messing with DNS configuration.