[issue1285086] urllib.quote is too slow

Tres Seaver report at bugs.python.org
Mon May 10 19:05:12 CEST 2010


Tres Seaver <tseaver at agendaless.com> added the comment:

I can only reiterate that Zope apps can call 'urllib.quote' dozens,
hundreds, even thousands of times on a single request:  the
reason for the original bug report was that 'urllib.quote' was
showing up frequently on profiling output for such requests.
Short-circuiting the case for the empty string and the case that
the string being quoted actually contains only safe characters
together made 'urllib.quote' disappear from the profiler output.

Newer frameworks, such as 'repoze.bfg', avoid using
'urliib.quote' at all for just this reason.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1285086>
_______________________________________


More information about the Python-bugs-list mailing list