]> granicus.if.org Git - python/commitdiff
After some discussion with Jeremy and Fred, decided to limit the
authorGuido van Rossum <guido@python.org>
Mon, 14 Jul 1997 19:08:15 +0000 (19:08 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 14 Jul 1997 19:08:15 +0000 (19:08 +0000)
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.

Lib/urlparse.py

index aeed393a837e1ffbaf9d3fb92977c45aefd79b81..22a5fd0e901d4094a9319108529106f1f57f027f 100644 (file)
@@ -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():