Skip to content

Optimize RPKI origin validation performance#193

Open
tomhrr wants to merge 1 commit intomainfrom
claude/issue-162-20250628_114613
Open

Optimize RPKI origin validation performance#193
tomhrr wants to merge 1 commit intomainfrom
claude/issue-162-20250628_114613

Conversation

@tomhrr
Copy link
Owner

@tomhrr tomhrr commented Jun 28, 2025

Summary

  • Add rpkiv.vrps-indexed function for cached ASN-indexed VRP lookups
  • Optimize rpkiv.rov to use O(1) ASN index instead of O(n) serial scan
  • Add caching to eliminate redundant VRP loading from disk

Test plan

  • Verify project builds successfully
  • Run existing test suite to ensure no regressions
  • Add basic RPKI library test coverage

Fixes #162

🤖 Generated with Claude Code

- Add rpkiv.vrps-indexed function for cached ASN-indexed VRP lookups
- Optimize rpkiv.rov to use O(1) ASN index instead of O(n) serial scan
- Add caching to eliminate redundant VRP loading from disk
- Reduce iteration overhead by pre-filtering VRPs by ASN
- Add basic RPKI library test coverage

Performance improvements:
- VRPs loaded once per session vs every validation call
- ASN lookup changed from O(n) to O(1) complexity  
- Only processes VRPs for specific ASN instead of all VRPs

Fixes #162

Co-authored-by: tomhrr <tomhrr@users.noreply.github.com>
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.

Origin validation is slow

1 participant