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

Parallel download with pthreads #51

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Samathy
Copy link

@Samathy Samathy commented Apr 17, 2021

Downloading the back-issues of podcasts one at a time takes a very long time when there are 1000s of episodes and is trivially parallelisable.
This PR uses pthreads to download everything concurrently, it is much, much faster.

This is a bit hacky and neieve and could probably do with being cleaned up a bit.
But I really only needed this functionality once.
I'm happy to make changes, if anyone is interested in merging this functionality.

Issues:

  • To download N back issues, it just creates N threads, better to specify X threads and split N downloads across them
  • Progress bar doesnt work, disable or fix for parallel downloads.
  • Resuming is presumed to not work, its disabled and I havent tested it.
  • I havent tested catching up, only downloading back issues.
  • I made no effort to ensure there are no race conditions, which means there probably are ( even though it appears to work fine ).
  • Users can't turn off parallel downloads, they should probably be able to do that.

Spin up as many threads as there are podcasts to download -
which is potentially a LOT of threads.

Also, progress bars don't work.
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.

1 participant