[issue8238] Proxy handling

2010-03-26 Thread Ciprian Trofin

New submission from Ciprian Trofin ciprian.tro...@ktd.ro:

After I installed Python 2.6.5, I noticed a drop in performance of web 
connections via proxy.

This script:
-
import time
import urllib2

timeMark = time.time()
opener = urllib2.build_opener()
textWeb = opener.open(http://www.google.com/;).read()
print time.time() - timeMark
-

takes about 60 seconds to complete (consistently)

The same script, run using Python 2.6.2 is completed in less than 1 second  
(0.2seconds)

The test system:
- Windows XP SP3
- internet connection via corporate connection, using a proxy (the proxy is set 
in Control Panel - Internet Options etc)

--
components: None
messages: 101742
nosy: ciprian.trofin
severity: normal
status: open
title: Proxy handling
type: performance
versions: Python 2.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8238
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8238] Proxy handling

2010-03-26 Thread Ciprian Trofin

Ciprian Trofin ciprian.tro...@ktd.ro added the comment:

I attached a screenshot.

The proxy is on the corporate network. I'm not setting it up, I'm only using 
it. Internet Explorer needs that setting in order to connect. Firefox needs 
this proxy set as manual proxy configuration.

I looked deeper into the situatioan, usign the following (modified) script:

---
import time
import urllib2

timeMark = time.time()
opener = urllib2.build_opener()

proxy = urllib2.ProxyHandler({http : http://10.249.1.63:80})
opener.add_handler(proxy)

textWeb = opener.open(http://www.google.com/;).read()

print time.time() - timeMark

---

The only difference from the script above: I set up the proxy manually.
I tested the new script in 2.6.5

With Windows proxy active: same problem, long waiting time.
With Windows proxy disabled: fast execution.

--
Added file: http://bugs.python.org/file16667/proxy.png

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8238
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com