Commit 73dec98
perf: add LRU cache to shapely version checking
- Add functools.lru_cache decorator to _shapely_is_older_than()
- Remove global _SHAPELY_VERSION variable
- Cache up to 8 version comparison results
- Reduces repeated parsing of version strings in hot paths1 parent bcf7112 commit 73dec98
1 file changed
+3
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| 16 | + | |
18 | 17 | | |
19 | | - | |
20 | | - | |
21 | | - | |
| 18 | + | |
22 | 19 | | |
23 | 20 | | |
24 | 21 | | |
0 commit comments