Commit Graph
2 Commits
Author SHA1 Message Date
ARIA 9c0f09619d Fixes #11: Memory management enhancements
- Add clearDomCache() for jQuery object cache invalidation on panel rebuild
- Track all event handlers in on()/once() for complete cleanup by unregisterAllEvents()
- Migrate direct eventSource.on() calls to tracked onEvent() in index.js, injector.js, sillyTavernExpressions.js
- Add clearDebugLogs() called on CHAT_CHANGED to prevent memory accumulation
- Add trackJQueryHandler()/cleanupJQueryEvents() infrastructure for jQuery event cleanup
- Add comprehensive memory management tests (14 new tests, all passing)
2026-07-12 14:31:14 +02:00
ARIA 4e4b2328ba Fixes #9: Parser performance optimizations
- Pre-compile all regex patterns as module-level constants in parser.js and jsonRepair.js
- Add format detection caching (lastDetectedFormat, formatCacheHits) to skip redundant checks
- Add clearFormatCache() export for cache invalidation
- Add comprehensive test suite (33 tests) for parser and jsonRepair modules
- Fix regex escaping in dynamic patterns (statRegex, fieldRegex)
- Improve toFieldKey() regex specificity
2026-07-12 13:58:21 +02:00