Skip to content

Fix/iplist blocklist scan perf 2#324

Closed
hansott wants to merge 2 commits into
mainfrom
fix/iplist-blocklist-scan-perf-2
Closed

Fix/iplist blocklist scan perf 2#324
hansott wants to merge 2 commits into
mainfrom
fix/iplist-blocklist-scan-perf-2

Conversation

@hansott

@hansott hansott commented Jul 15, 2026

Copy link
Copy Markdown
Member

No description provided.

dmitrii and others added 2 commits July 14, 2026 12:35
IPList.containsAddress() scanned every stored subnet/host linearly
(O(n)). At 300k+ entries this costs ~13.7ms per lookup; isIpBlocked
runs it up to 4x per request. Switched to inet.ipaddr's built-in
DualIPv4v6Tries, giving O(bits) containment lookups (~1.2us at the
same scale). Public API and matches() semantics unchanged; all
existing IPListTest cases pass unmodified.
@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@hansott hansott closed this Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant