Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify action_tasks #249

Merged
merged 5 commits into from
Feb 29, 2024
Merged

Simplify action_tasks #249

merged 5 commits into from
Feb 29, 2024

Conversation

ianmkenney
Copy link
Collaborator

action_tasks previously issued queries for each task to be actioned. This PR reduces this to a single query using the UNWIND clause, while accounting for the potential order loss from the UNWIND. Local tests show equal to improved performance depending on the number of tasks actioned. For $n=1$ tasks, the performance remains unchanged (~0.3 s). For $n=10, 100, 1000$, however, the runtime is reduced by (very) roughly $50\%$, $80\%$, and $90\%$, respectively. More concretely this comes out to around:

  • $n=10$; $0.7$ s to $0.4$ s
  • $n=100$; $3$ s to $0.6$ s
  • $n=1000$; $24$ s to $1.6$ s

@codecov-commenter
Copy link

codecov-commenter commented Feb 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.86%. Comparing base (36731f4) to head (6f8f84a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #249      +/-   ##
==========================================
- Coverage   82.30%   81.86%   -0.44%     
==========================================
  Files          26       26              
  Lines        3068     3066       -2     
==========================================
- Hits         2525     2510      -15     
- Misses        543      556      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dotsdl dotsdl self-requested a review February 29, 2024 00:21
@dotsdl
Copy link
Member

dotsdl commented Feb 29, 2024

Awesome work @ianmkenney! Is this ready for review?

@ianmkenney
Copy link
Collaborator Author

@dotsdl Will request review after merging #244 and resolving the ensuing conflicts

@ianmkenney
Copy link
Collaborator Author

@dotsdl should be good for review

Copy link
Member

@dotsdl dotsdl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks excellent @ianmkenney! Merge when satisfied!

@ianmkenney ianmkenney merged commit a6fd705 into main Feb 29, 2024
4 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.

3 participants