Commit 8d26fca
refactor: Optimize field expression parsing with pre-compiled regex
Replace manual character iteration with regex-based splitting in
_split_expander_expression(). Pre-compile pattern at module level
to avoid redundant compilation across millions of invocations when
processing large DICOM datasets with extensive recipes.
- Add _EXPANDER_SPLIT_RE compiled pattern for splitting on first
colon outside quotes
- Handle private tags with colons in creator names (e.g., "Siemens: Thorax/...")
- Improve performance1 parent 7221980 commit 8d26fca
1 file changed
+8
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
| |||
229 | 232 | | |
230 | 233 | | |
231 | 234 | | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
239 | 240 | | |
240 | 241 | | |
241 | 242 | | |
| |||
0 commit comments