Files
nofx/decision
ZhouYongyou 14ba145ea7 perf(decision): precompile regex patterns for performance
## Changes
- Move all regex patterns to global precompiled variables
- Reduces regex compilation overhead from O(n) to O(1)
- Matches z-dev's performance optimization
## Modified Patterns
- reJSONFence: Match ```json code blocks
- reJSONArray: Match JSON arrays
- reArrayHead: Validate array start
- reArrayOpenSpace: Compact array formatting
- reInvisibleRunes: Remove zero-width characters
## Performance Impact
- Regex compilation now happens once at startup
- Eliminates repeated compilation in extractDecisions() (called every decision cycle)
- Expected performance improvement: ~5-10% in JSON parsing
## Safety
 All regex patterns remain unchanged (only moved to global scope)
 Compilation successful
 Maintains same functionality as before
2025-11-05 00:54:51 +08:00
..