perf(pagerduty): parallelize permission checks with asyncio.gather#320
perf(pagerduty): parallelize permission checks with asyncio.gather#320sylvainkalache merged 1 commit intomainfrom
Conversation
The check_permissions() method was making 4 sequential HTTP calls (users, incidents, services, oncalls), each waiting for the previous to complete. Now uses asyncio.gather() to run all 4 in parallel. Expected improvement: ~2.3s avg → ~0.6-0.8s (limited by slowest call).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @sylvainkalache's task —— View job Code Review FindingsBug & Logic Error:
Security Issue:
Code Quality Issues:
Performance Concerns:
|
Greptile OverviewGreptile SummaryReplaced sequential HTTP calls with parallel execution using Key changes:
Confidence Score: 5/5
Important Files Changed
|
Summary
check_permissions()was making 4 sequential HTTP calls to PagerDuty API (users, incidents, services, oncalls)asyncio.gather()to run all 4 checks in parallel within the sameaiohttp.ClientSession_check_endpoint()helper to eliminate code duplication (4 nearly-identical blocks → 1 reusable function)Expected Impact
Test plan