After some discussion with Jeremy and Fred, decided to limit the · python/cpython@7449540 (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 7449540
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.
File tree
1 file changed
lines changed
1 file changed
lines changed
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -28,7 +28,7 @@ | ||
28 | 28 | # Characters valid in scheme names |
29 | 29 | scheme_chars = string.letters + string.digits + '+-.' |
30 | 30 | |
31 | -MAX_CACHE_SIZE = 2000 | |
31 | +MAX_CACHE_SIZE = 20 | |
32 | 32 | _parse_cache = {} |
33 | 33 | |
34 | 34 | def clear_cache(): |