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

adding a quick concurrency feature #31

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tomharvey
Copy link
Contributor

@tomharvey tomharvey commented Nov 16, 2021

tomharvey wants to merge 1 commit

... well that's overstating things a bit. This is a draft PR for a reason and for the discussion of #30

I can well imagine some philosophical objection to adding the concurrency gem, and if we want to go down this path there is some work on exception handling, testing and making the thread pool size configurable.

But, my deploy went from > 10min (got bored waiting) to < 1min.

If you're interested in seeing the performance change with your own use case, adding this to your Gemfile will do:

gem 's3_asset_deploy', :git => 'https://github.com/tomharvey/s3_asset_deploy.git', branch: 'concurrency'

Currently, logging is broken - it logs when we start, but not complete the upload.

@tomharvey
Copy link
Contributor Author

rails/sprokets is using the concurrency library (so it'll be in any rails user's Gems already. But, it's using promises instead of a low level TPE https://github.com/rails/sprockets/search?q=export_concurrent might be some good inspiration for how this might work "properly"

@tomharvey tomharvey changed the title adding some quick concurrency feature adding a quick concurrency feature Nov 16, 2021
@summera
Copy link
Contributor

summera commented Mar 5, 2022

@tomharvey sorry for the delay on this! It's a great idea. I'll take a look as soon as I can.

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