summaryrefslogtreecommitdiffstats
path: root/Lib/urlparse.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-07-14 19:08:15 (GMT)
committerGuido van Rossum <guido@python.org>1997-07-14 19:08:15 (GMT)
commit74495409861b357d9925937d6576229c74e2550d (patch)
tree2936d15a36ef44c9863e3d4ad9caef89ae0e5565 /Lib/urlparse.py
parent5d8123f34af77b988f7dcefd8cef4423879444d8 (diff)
downloadcpython-74495409861b357d9925937d6576229c74e2550d.zip
cpython-74495409861b357d9925937d6576229c74e2550d.tar.gz
cpython-74495409861b357d9925937d6576229c74e2550d.tar.bz2
After some discussion with Jeremy and Fred, decided to limit the
default urlparse cache size to 20 instead of 2000. The main use of the cache seems to be to gain some speed in Grail, which is calling urljoin with the same base for each anchor. 2000 is a bit too big for Jeremy, who doesn't need the cache at all. 20 should keep at least 95% of the Grail speedup while wasting an insignificant amount of memory in Jeremy's application.
Diffstat (limited to 'Lib/urlparse.py')
-rw-r--r--Lib/urlparse.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urlparse.py b/Lib/urlparse.py
index aeed393..22a5fd0 100644
--- a/Lib/urlparse.py
+++ b/Lib/urlparse.py
@@ -28,7 +28,7 @@ uses_fragment = ['ftp', 'hdl', 'http', 'gopher', 'news', 'nntp', 'wais',
# Characters valid in scheme names
scheme_chars = string.letters + string.digits + '+-.'
-MAX_CACHE_SIZE = 2000
+MAX_CACHE_SIZE = 20
_parse_cache = {}
def clear_cache():