Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7449540

Browse files
committed
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.
1 parent 5d8123f commit 7449540

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/urlparse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# Characters valid in scheme names
2929
scheme_chars = string.letters + string.digits + '+-.'
3030

31-
MAX_CACHE_SIZE = 2000
31+
MAX_CACHE_SIZE = 20
3232
_parse_cache = {}
3333

3434
def clear_cache():

0 commit comments

Comments
 (0)