You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(security): memoized token scanner in PiiMasker.detectPiiColumn eliminating dynamic RegExp and split/join #1540
A third dynamic regex (RegExp(r'(^|_)(api|private|access|secret|auth)_key($|_)')).
For 30 columns, this generates over 250 temporary heap objects per query execution.
Solution
Add a static thread-safe LRU/cache map (_piiCache) since standard database column names (id, name, created_at, status, etc.) are highly repetitive.
Replace regex transformations with a simple character scanner on ASCII code units (codeUnitAt).
Benefits
Instant O(1) cache hits for recurring column names.
Zero regex compilations and zero split/join allocations during PII masking.
Fixed on dev by 0659f49: perf(security): scan PII column names and values without regex. It reaches main with the next dev to main merge (closed after checking the code and its tests).
Activity
Merge pull request #1608 from QueryaHub/issue/1540-pii-masker
ZhuchkaTriplesix commentedon Oct 25, 2026
Fixed on dev by 0659f49: perf(security): scan PII column names and values without regex. It reaches main with the next dev to main merge (closed after checking the code and its tests).