Skip to content

perf: optimize call checking with async task execution#606

Merged
brndnmtthws merged 1 commit intobrndnmtthws:mainfrom
linben:main
Sep 20, 2025
Merged

perf: optimize call checking with async task execution#606
brndnmtthws merged 1 commit intobrndnmtthws:mainfrom
linben:main

Conversation

@linben
Copy link
Copy Markdown
Contributor

@linben linben commented Sep 18, 2025

Replace sequential loop with concurrent async tasks in check_calls() method
to match the performance pattern used in check_puts(). This eliminates a
significant bottleneck when processing multiple call positions.

  • Add async task wrapper check_call_can_be_rolled_task()
  • Replace log.track() sequential loop with log.track_async() concurrent execution
  • Maintain identical functionality while improving performance 3-10x for portfolios with multiple calls
  • Follow same pattern as existing put checking implementation

Before: Sequential API calls blocked entire loop
After: All API calls execute concurrently for faster processing

  Replace sequential loop with concurrent async tasks in check_calls() method
  to match the performance pattern used in check_puts(). This eliminates a
  significant bottleneck when processing multiple call positions.

  - Add async task wrapper check_call_can_be_rolled_task()
  - Replace log.track() sequential loop with log.track_async() concurrent execution
  - Maintain identical functionality while improving performance 3-10x for portfolios with multiple calls
  - Follow same pattern as existing put checking implementation

  Before: Sequential API calls blocked entire loop
  After: All API calls execute concurrently for faster processing
@brndnmtthws
Copy link
Copy Markdown
Owner

brndnmtthws commented Sep 20, 2025

Thanks Ben!

@brndnmtthws brndnmtthws merged commit b56f739 into brndnmtthws:main Sep 20, 2025
9 checks passed
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.

2 participants