Commit d6158a3
perf: Use HashSet for O(1) secret masking lookups (#1723)
Fixes #1539
Changed BuildSystemSecretMasker from List<string> to HashSet<string> for
tracking already-masked secrets. This provides O(1) lookup instead of O(n),
improving performance when many secrets need to be masked.
Before: O(n*m) where n=existing secrets, m=new secrets
After: O(m) - each new secret is O(1) lookup
HashSet.Add() returns false if the item already exists, eliminating the
need for a separate Contains() check.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent 22b9325 commit d6158a3
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| |||
0 commit comments