Commit f57f65b
authored
Cache get decoder class from string (#117)
* Moved the logic from obtaining a decoder class from a string to its own method. This allows caching, which greatly improves performance.
* Added default maxsize arg to lru_cache for Python <3.8 compatibility
* Revert the caching changes of get_decoder_class, instead cache convert_type_string and compile the regex for faster execution.
* Revert the caching changes of get_decoder_class, instead cache convert_type_string and compile the regex for faster execution.
* Okay, actually reverted the initial changes this time.1 parent e8aaf0d commit f57f65b
1 file changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| 66 | + | |
| 67 | + | |
65 | 68 | | |
66 | 69 | | |
| 70 | + | |
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
| |||
130 | 134 | | |
131 | 135 | | |
132 | 136 | | |
133 | | - | |
| 137 | + | |
134 | 138 | | |
135 | 139 | | |
136 | 140 | | |
| |||
151 | 155 | | |
152 | 156 | | |
153 | 157 | | |
154 | | - | |
| 158 | + | |
155 | 159 | | |
156 | 160 | | |
157 | 161 | | |
| |||
1076 | 1080 | | |
1077 | 1081 | | |
1078 | 1082 | | |
1079 | | - | |
| |||
0 commit comments