#474 Performance: Regex compiled on every call in variable_resolver.py
Description
Editengine/interpreters/variable_resolver.py lines 196, 207, 240
Hot path compiles regex patterns on every variable interpolation:
- Line 196: re.fullmatch(r'\{\{([^}]+)\}\}', value)
- Line 207: re.sub(r'\{\{([^}]+)\}\}', replacer, value)
- Line 240: re.split(r'[.\[\]]', path)
Impact: HIGH - executed per variable, multiple times per workflow task.
FIX: Pre-compile at module level:
```python
_VARIABLE_PATTERN = re.compile(r'\{\{([^}]+)\}\}')
_PATH_SPLIT_PATTERN = re.compile(r'[.\[\]]')
```
Comments
Loading comments...
Context
Loading context...
Audit History
View AllLoading audit history...