mirror of
https://github.com/Horizontal42/summarum.git
synced 2026-11-11 02:12:00 +03:00
Introduces `parsedRefsCache` in `Workspace` to prevent repeatedly executing the heavy `XREF_SCAN_RE` regex across the same unchanged sheet text during cache invalidations. Co-authored-by: Horizontal42 <75383519+Horizontal42@users.noreply.github.com>
3 lines
504 B
Markdown
3 lines
504 B
Markdown
## 2025-02-18 - Repeated Regex Execution Caching
|
|
**Learning:** In recursive or looping traversal like graph cycle detection (e.g. invalidation of multiple sheets), running heavy Regex (`matchAll`) repeatedly on the exact same text is extremely slow and compounds exponentially.
|
|
**Action:** Introduce text-based short-circuiting caches (e.g., matching the original `text` property against the cached payload string) where text extraction logic like Regex or parsing runs purely on deterministic inputs.
|