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

perf: send seed data requests asynchronously #2825

Merged
merged 7 commits into from
Nov 12, 2024
Merged

Conversation

mcmcgrath13
Copy link
Collaborator

@mcmcgrath13 mcmcgrath13 commented Oct 29, 2024

PULL REQUEST

Summary

Use asynchronous requests when converting seed data. Locally, this speeds up conversion from 8:45 to 5:12

  • Split the create-seed-data-py script into two phases: 1) gathering all the requests to send, 2) sending all the requests async and handling responses
  • This also adds n of total printing, which I find a nicer ux

@mcmcgrath13 mcmcgrath13 marked this pull request as ready for review November 8, 2024 22:41
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure on other machines, but locally I'm actually getting slower results.

Async: 10:09:11 - 10:12:45 = 3 minutes 34 seconds
Sync: 10:16:11 - 10:19:36 = 3 minutes 25 seconds

Copy link
Collaborator

Choose a reason for hiding this comment

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

Async ran for me in 5:17 while sync was 6:10.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

so almost a minute improvement, not great, not awful

Should we go ahead and merge? or any concerns about adding the async-ness in general?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks good to me! I was testing around with lower memory / cpu and got similar results to Mary's!

@mcmcgrath13 mcmcgrath13 added this pull request to the merge queue Nov 12, 2024
Merged via the queue into main with commit c4130e6 Nov 12, 2024
11 checks passed
@mcmcgrath13 mcmcgrath13 deleted the mcm/seed-data-async branch November 12, 2024 19:52
@mcmcgrath13 mcmcgrath13 linked an issue Nov 13, 2024 that may be closed by this pull request
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.

Make the convert-seed-data script async
3 participants