[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2012-04-28 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 64a6824d129d by Senthil Kumaran in branch 'default': Fix Issue6085 - SimpleHTTPServer address_string to return client ip instead of client hostname http://hg.python.org/cpython/rev/64a6824d129d -- nosy:

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2012-04-28 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: The original change was introduced in this issue401197 which seems to use fqdn at *all appropriate places*. In this case, after about a decade, it was realized that using fdqn for client connection may not be appropriate when hostname is

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2012-04-28 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset fb1e71c7619a by Senthil Kumaran in branch '2.7': Fix issue6085 - Remove the delay caused by fqdn lookup while logging in BaseHTTPRequestHandler http://hg.python.org/cpython/rev/fb1e71c7619a New changeset

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2012-04-28 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: Fixed in all codelines. Closing this. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2012-04-19 Thread Yuval Greenfield
Yuval Greenfield ubershme...@gmail.com added the comment: I agree with Antoine on this. Though the suggested patch is wrong. I believe we should leave address_string alone. Simply stop the log_message method from using it. Either way we'd be changing the log format but if we don't have to

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2012-02-25 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: +1 to Antoine’s proposal of removal. Agreed. Here's a patch. Do note, however, that it's a behavior change: the address_string() method is documented to return a resolved hostname (when possible). -- keywords: +needs review

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2012-02-24 Thread wmg
Changes by wmg wmg...@gmail.com: -- nosy: +wmgaca ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6085 ___ ___ Python-bugs-list mailing list

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2012-02-24 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: +1 to Antoine’s proposal of removal. -- nosy: +eric.araujo versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6085

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2012-02-13 Thread Ralf Schmitt
Changes by Ralf Schmitt python-b...@systemexit.de: -- nosy: +schmir ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6085 ___ ___ Python-bugs-list

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2011-03-28 Thread knickerkicker
Changes by knickerkicker knicker.kic...@gmail.com: -- nosy: +knicker.kicker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6085 ___ ___

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2011-03-28 Thread Charles-Francois Natali
Changes by Charles-Francois Natali neolo...@free.fr: Removed file: http://bugs.python.org/file17081/base_http_server_fqdn_lag.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6085 ___

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2010-04-26 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Actually, DNS resolution should be disabled by default, as in most HTTP servers probably. -- nosy: +pitrou stage: - unit test needed ___ Python tracker rep...@bugs.python.org

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2010-04-26 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: And for this specific request, it fdqn is looked up only for logging to sys.stderr. Either removing the fqdn call or just caching per connection it as the patch does is both fine. I doubt if someone is relying this logging anywhere in the

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2010-04-26 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: And for this specific request, it fdqn is looked up only for logging to sys.stderr. Either removing the fqdn call or just caching per connection it as the patch does is both fine. I doubt if someone is relying this logging anywhere in the

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2010-04-26 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: On Mon, Apr 26, 2010 at 10:45:56AM +, Antoine Pitrou wrote: What do you mean? BaseHTTPRequestHandler is tested in test_httpservers. I meant specifically for that function which is logging to sys.stderr. No return values, state changes

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2010-04-26 Thread Santoso Wijaya
Santoso Wijaya santa@me.com added the comment: Please correct my understanding if I am mistaken, but from skimming through the source code, it seems that a new BaseHTTPRequestHandler is instantiated per request. If a caching mechanism is to be adopted as per the patch, wouldn't it be

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2010-04-26 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr added the comment: @santa4nt: You're correct, the cache is retained only from within the same handler: the other solution would be to keep the cache at the server level, but then you'd have to deal with the cache size (you don't want it to grow

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2010-04-25 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr added the comment: The attached patch caches the result of FQDN lookup. -- keywords: +patch Added file: http://bugs.python.org/file17079/base_http_server_fqdn_lag.diff ___ Python tracker rep...@bugs.python.org

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2010-04-25 Thread Santoso Wijaya
Santoso Wijaya santa@me.com added the comment: Doesn't that only cache the first remote client it encounters, though? Maybe a dictionary of caches? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6085

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2010-04-25 Thread Charles-Francois Natali
Changes by Charles-Francois Natali neolo...@free.fr: Removed file: http://bugs.python.org/file17079/base_http_server_fqdn_lag.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6085 ___

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2010-04-25 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr added the comment: Doesn't that only cache the first remote client it encounters, though? Maybe a dictionary of caches? A BaseHTTPRequestHandler is instantiated every time a client connects, so there should be only one client per handler, no (the

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2010-04-22 Thread Charles-Francois Natali
Charles-Francois Natali neolo...@free.fr added the comment: Yes, performing a DNS resolution every time we log something is definitely sub-optimal. We should perform it only once, and cache the result. -- nosy: +neologix ___ Python tracker

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2010-04-22 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +orsenthil priority: - normal versions: +Python 3.2 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6085 ___

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2010-04-21 Thread Santoso Wijaya
Santoso Wijaya santoso.wij...@gmail.com added the comment: There is a simple workaround to bypass the hostname resolution mechanism, so that the server can respond faster. # This is a hack to patch slow socket.getfqdn calls that # BaseHTTPServer (and its subclasses) make. # See:

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2009-05-22 Thread Wentao Han
New submission from Wentao Han wentao@gmail.com: The invocation of socket.getfqdn to get FQDN of the host may delay for several seconds on some platforms when no appropriate host name is found. This causes lag when using SimpleXMLRPCServer and other class derived from BaseHTTPServer for